Auto-Tuning SINAMICS S120 Speed Control Loop with SIMOTION D445

David Krause12 min read
Motion ControlSiemensTutorial / How-to
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

Auto-Tuning SINAMICS S120 Speed Control Loop with SIMOTION D445

System Architecture: SINAMICS S120, SIMOTION D445, and CX32

The configuration described in the source combines three Siemens motion-control components: a SIMOTION D445 motion controller, one or more CX32 controller extensions, and SINAMICS S120 drive lineups that close the loop on the connected servomotors.

SCOUT Engineering PC with STARTER/SCOUT PROFIBUS / Ethernet SIMOTION D445 Motion Controller Firmware 4.5 SPx CX32 SINAMICS Extension PROFINET/PROFIBUS SINAMICS S120 Line Module + Motor Module DRIVE-CLiQ SINAMICS S120 Servo motor 2

SIMOTION D445 executes the motion programs, runs the axis technology objects, and dispatches setpoints to the drives. The CX32 is a SINAMICS S120 Control Unit mounted on the SIMOTION D445 rack; it communicates with SIMOTION as a slave over PROFIBUS or PROFINET and uses DRIVE-CLiQ on the drive side to expose additional SINAMICS S120 axes without needing a separate drive controller. Each SINAMICS S120 closes the current and speed loops locally; the position loop is typically closed in SIMOTION. This is why two tuning points exist: the drive-level speed controller inside SINAMICS, and the SIMOTION-side axis tuning that affects position-loop and following-error behavior.

For commissioning, the canonical reference is the SIMOTION D4x5 Commissioning and Configuration Manual and the SINAMICS S120 Function Manual (FH1) on the Siemens Industry Online Support portal. The function for one-button speed controller optimization is described in detail there as One Button Tuning (OBT).

Prerequisites and Software Setup

Auto-tuning is a closed-loop procedure; it rotates the motor in both directions and injects test signals. Before pressing the auto-tuning button, the following must be in place.

Item Required state How to verify
SIMOTION SCOUT V5.3 or later (V5.4 recommended for D445 firmware 5.x) SCOUT → Help → About
SINAMICS STARTER / StartDrive V5.2 or later, matching drive firmware
D445 firmware ≥ 4.4 (recommend 4.5 SP1+) SCOUT → D445 → Version view
SINAMICS S120 firmware ≥ 4.8 for current OBT (5.2 for One Button Tuning extended) STARTER → Drive unit → Version
DRIVE-CLiQ topology All components online and green SCOUT/STARTER topology view
Servomotor identification Motor-ID, pole-pair count, encoder type detected p1300 = motor type, r107 holds encoder status
Mechanical clearance Motor can rotate freely ± the auto-tuning travel (default ± 1 motor revolution) Visual check, E-stop tested
Brake released All motor holding brakes forced open STARTER → Control word bits; p8501 for brake
Safety: Auto-tuning moves the axis. Confirm that the travel range is clear, that the E-stop circuit is tested, that the drive's STO inputs are active, and that all software limit switches and following-error limits are configured. If the axis is part of a coupled machine, disengage the coupling before running OBT.

How the Speed Controller Auto-Tuning Works Internally

The SINAMICS speed controller is a PI controller with the structure shown below.

Setpoint n* Σ PI Controller Kp + Ki/s Current setpoint filters Motor + Mechanics G(s) Actual speed n

The auto-tuner excites the closed speed loop with a controlled pseudo-random binary signal (PRBS) superimposed on the speed setpoint, measures the response, and fits a plant model. From the identified inertia and bandwidth, it computes the proportional gain Kp and the integral action time Tn, then writes them to:

Parameter Meaning Typical after OBT
p1460 (or p1400 bit) Kp Speed controller P-gain upper adaptation 0.5 - 30 [Ns/rad]
p1470 Tn Speed controller integral time upper adaptation 5 - 50 ms
p1441 Tn\_actual smoothing Filter on actual speed value 0.2 - 2 ms
p1961 dynamic factor Aggressiveness of computed controller 100 % (default)
p1974 (result) Last computed Kp (read-only) decimal in Ns/rad
p1975 (result) Last computed vibration-damping coefficient 0.0 - 0.5
p1976 (result) Last computed current-setpoint filter type 0 - 4

The reference IEEE paper "Automatic control loop tuning of PMAC servomotor drives using PID" describes a similar PRBS-based identification strategy for permanent-magnet AC servomotors, which is the same class of motor the SINAMICS S120 line typically drives.

Step-by-Step: Drive-Side Auto-Tuning in SINAMICS S120

This is the first procedure from the source thread: tune the speed controller inside the drive itself.

  1. Connect SCOUT to the SIMOTION D445 and go online.
  2. Open the project navigator and double-click the SINAMICS S120 drive unit. SCOUT launches STARTER in embedded mode.
  3. In STARTER, navigate to Commissioning → Optimize speed controller (or click the speed-controller icon in the toolbar).
  4. Select the target axis on the drive (Servo or Vector, depending on the configured line module and motor module).
  5. Set the dynamic factor p1961. Default 100 %. Use 80-150 % to vary aggressiveness:
    • 80 % - very soft, low acoustic noise, slower step response.
    • 100 % - default, balanced.
    • 150 % - stiff, fast, but may excite mechanical resonance.
  6. Set the maximum speed for the test (default = 10 % of p1082). For very low-inertia couplings use a higher percentage to get a clean signal.
  7. Confirm the travel distance (default one motor revolution each direction). The motor must be free to move this much.
  8. Click Optimize (Start). The drive raises torque briefly, runs the PRBS identification, then a small step response test, and writes the new Kp, Tn to p1460 and p1470.
  9. When STARTER shows Optimization complete, the result is automatically backed up RAM-to-ROM on the CF card.

The drive-side tuning is the foundation - the position loop in SIMOTION is meaningless if the speed loop is sluggish or unstable.

Step-by-Step: Axis-Side Auto-Tuning in SIMOTION SCOUT

This corresponds to the second part of the field report and to the SCOUT Screen Autotuning pull-down menu referenced there.

  1. In SCOUT, right-click the technology object (TO) of the axis and open Properties → Tuning tab.
  2. Choose the scope: Drives or Axis.
  3. Choose the controller: SINAMICS (drive-internal speed loop) or SIMOTION (position loop, following error). The first pass is usually Drives → SINAMICS; the second pass is Axis → SIMOTION.
  4. Click Auto-Tuning. The SCOUT screen shows the current following error, dynamic response factor, and a live Bode plot.
  5. Set a movement profile the auto-tuner will use: stroke, velocity, and acceleration must keep the test within the software limits.
  6. Start. The controller enable stays on; the axis traverses, the system injects PRBS into the setpoint path, and the loop is fitted.
  7. Accept the result or iterate. The auto-tuner writes into the axis configuration (TO configuration → Control structure → Position controller → Kp and Tn).
Tuning order matters. Run drive-side tuning first, accept the result, then run axis-side tuning. Reversing the order is the most common reason the SIMOTION-side tuner misreads the plant and produces a too-low position-loop gain.

Measuring Function: Frequency Response and Bode Diagram

The source thread specifically mentions that the system has a measuring function that produces a frequency analysis (Bode diagram) so the engineer can decide whether a current setpoint filter is necessary.

To invoke the measuring function in SCOUT/STARTER:

  1. Open the drive unit, navigate to Functions → Measuring function or use the toolbar Trace → Frequency response.
  2. Select signal source (typically the speed setpoint filter input) and signal sink (speed actual).
  3. Configure:
    • Bandwidth: 1 Hz to 1 kHz is typical for servos.
    • Amplitude: 1-3 % of p1082 rated speed. Too small = poor signal-to-noise; too large = saturates torque.
    • Sweep: PRBS or stepped sine.
  4. Start. SCOUT displays the Bode diagram and writes the result to p1960 / r1970 et al.
Frequency (Hz) → Magnitude (dB) +20 dB 0 dB -20 dB resonance peak Open-loop speed (red) and phase-margin (blue) Bode

Reading the plot. A clean mechanical plant appears as a smooth -20 dB/decade roll-off beyond the speed-controller bandwidth. A resonance peak (the example bump at 120 Hz above) indicates a mechanical eigenmode - usually belt stiffness, gearbox compliance, or a cantilevered load. Two courses of action exist:

  • Reduce Kp until the loop gain crosses 0 dB below the resonance frequency. Conservative, but loses bandwidth.
  • Add a current-setpoint (notch) filter tuned to the resonance frequency, recovering bandwidth.

The auto-tuner chooses the first strategy by default (it lowers Kp and shortens the test bandwidth) but it also outputs a recommended current setpoint filter in p1976 if it can fit one.

Current Setpoint Filters for Mechanical Resonance

SINAMICS S120 provides four filter blocks in the current setpoint path, configurable as lowpass, highpass, bandpass, or bandstop.

Filter block Activation Type / frequency Quality / damping
Filter 1 p1656.0 p1666 (type), p1667 (center) p1668
Filter 2 p1656.1 p1676 (type), p1677 (center) p1678
Filter 3 p1656.2 p1686 (type), p1687 (center) p1688
Filter 4 p1656.3 p1696 (type), p1697 (center) p1698

Filter type codes (e.g. p1666):

  • 1 = lowpass 1st order
  • 2 = lowpass 2nd order (Butterworth)
  • 3 = bandstop (notch) 1st order
  • 4 = bandstop 2nd order (most useful for mechanical resonance)
  • 5 = highpass
  • 6 = bandpass

For a belt or gearbox resonance at 120 Hz with Q=5, set filter 1 to type 4, p1667 = 120 Hz, p1668 = 5. Quality values 1-10 are practical; below 1 the filter becomes wide and useless, above 10 it becomes noise-sensitive.

Watch the order. Notch filters are inserted in the current setpoint path. They affect the current loop, not the speed loop directly. Misapplied notch filters reduce the current-loop phase margin and can destabilize the drive above 1 kHz. Validate with a new Bode measurement after each filter is added.

F50102 Following Error Fault: Root Cause and Resolution

F50102 in SIMOTION is a following error alarm on a technology-object axis. It is raised when the actual position deviates from the setpoint position by more than the configured tolerance for more than the configured time. The source thread describes exactly this symptom: the axis shows a noticeable difference between setpoint and actual speed and the drive halts with F50102.

Typical root causes, ranked by frequency observed in the field:

Root cause How to confirm Remediation
Speed controller not tuned / too soft Trace shows large n* - n with slow settling Re-run drive-side OBT
Position-loop Kp too high Trace shows overshoot, oscillation Lower axis Kp 30-50 %
Mechanical resonance unfiltered Acoustic noise at constant speed; Bode peak Add bandstop filter as in the previous section
Following-error limits too tight F50102 trips at the configured tolerance Re-check the calculation (see below)
Encoder issue (DRIVE-CLiQ, cable) Trace shows actual value dropping or jumping Inspect DRIVE-CLiQ LED, replace cable
Motor data not identified r19 stator resistance differs from nameplate Run motor data identification p1900

For the third row, the SIMOTION following-error tolerance is configured in the TO Axis under Following error monitoring:

TO Axis → Configuration → Following error monitoring
  Position tolerance:  <position_tolerance> (LU)
  Minimum velocity:    <v_min> (1000 LU/min)
  Time:                <time_tolerance> (ms)

A rule of thumb that holds for most SINAMICS-fed axes:

v_tolerance_1000LU_per_min = v_setpoint * position_tolerance_LU / 1000
allowed_overshoot_position = v_actual_max * position_tolerance / v_setpoint

Increase the position tolerance to roughly 1.5 - 2× the measured steady-state following error plus 0.5 × the position-controller overshoot. Set the time to a value between 10 ms and 50 ms so transient violations are ignored.

Stiffness Adjustment and Controller Dynamics

The term stiffness in the source thread maps to the Kv factor (velocity loop bandwidth) of the SINAMICS speed controller. Three levers exist:

Lever Parameter Effect Limit
Dynamic factor p1961 Multiplier on Kp calculated by OBT 30 - 300 %
P-gain direct edit p1460, p1461 Raw Kp [Ns/rad] Stability, not parameter
Filter on actual speed p1441, p1442 Smooths speed signal; higher = lower loop bandwidth ≤ Tcycle current controller
Current setpoint filter p1656 - p1698 Notch on mechanical resonance Do not cascade more than 2nd-order

Increasing p1961 beyond 150 % typically requires either a stiffer mechanical coupling or a notch filter. With the Bode plot in hand, an engineer can tell whether the bandwidth is being limited by the drive electronics (no resonance) or by the mechanics (resonance peak). The first case calls for raising p1961; the second calls for a filter first, then p1961.

Verification and Commissioning Tests

After auto-tuning, the following checks close out the commissioning sequence.

  1. Step response test. Use SCOUT trace to step the speed setpoint 10 % at zero load. Verify overshoot < 5 %, settling time within the calculated 1/(2πfbw). Repeat with rated load.
  2. Following error trace. Run the production motion profile (or representative) at 100 % velocity. Record the maximum following error and the steady-state error. Steady-state should be < position_tolerance/2.
  3. Bode plot sanity check. Re-run the measuring function. Loop crossover should be at the same -3 dB frequency as p1961 implies. Phase margin > 45°.
  4. Endurance run. Run the profile for at least 100 cycles. F50102 must not trigger; motor temperature must stabilize below 80 % of class-F rating.
  5. Save to ROM. In STARTER/SCOUT: Target system → Copy RAM to ROM. Verify the CF card copy succeeds.
  6. Backup project. Archive the SCOUT project and the STARTER project on the engineering server. Document the final Kp, Tn, p1961, filter settings, and following-error limits in the machine logbook.

Which auto-tuning method should I use: drive-side (SINAMICS) or axis-side (SIMOTION)?

Always run both, in order. Drive-side first, because the position loop in SIMOTION assumes a properly tuned speed loop beneath it. Axis-side second, to close the position loop and tighten following-error behavior. The SCOUT Screen Autotuning pull-down exposes both: choose Drives → SINAMICS first, then Axis → SIMOTION.

What does the dynamic factor p1961 actually change?

It scales the proportional gain Kp that the One Button Tuning function writes to p1460. 100 % is the default balanced setting. 80 % produces a softer, less noisy controller; 150 % raises the speed-loop bandwidth and stiffness but increases the risk of exciting mechanical resonance.

My axis trips with F50102 immediately after auto-tuning - what should I check first?

Verify that the motor identification (p1910 / p1960) completed and that the measured stator resistance in r19 matches the nameplate. Then trace the speed actual value during the failing motion: if it lags the setpoint, the speed controller is too soft (re-run OBT with p1961 = 130 %); if it overshoots, the position loop is too stiff (lower the axis Kp). Acoustic noise during the trip indicates an unfiltered mechanical resonance - add a bandstop filter at the resonant frequency before retuning.

Can I auto-tune an axis mechanically coupled to a heavy load without decoupling it?

Yes, but set p1961 to 70-80 % and use a wider PRBS bandwidth. The auto-tuner reads the total inertia, so the gain it computes is conservative for the coupled system. Run a second pass after uncoupling if the application allows it - the result will be tighter and the position loop will gain bandwidth.

Where can I read the detailed parameter documentation for the SINAMICS S120 speed controller auto-tuning?

Use the SINAMICS S120 List Manual and SINAMICS S120 Function Manual in the Siemens Industry Online Support portal. Search the parameter list for p1960 - p1977 (speed controller optimization) and the SIMOTION D4x5 manual for the technology-object tuning tab. The SIMOTION SCOUT F1 help on the autotuning screen provides context-specific field descriptions as well.

Back to blog