Controlling Gravity Loads with SINAMICS P1513 Torque Compensation

David Krause17 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

Controlling Gravity Loads with SINAMICS P1513 Torque Compensation

Vertical axes driven by a permanent-magnet servo motor present a fundamentally asymmetric dynamic load: lifting a hanging mass requires active motor torque, while lowering the same mass is assisted by gravity. A single, direction-independent gain set for the speed and position controller cannot deliver equal dynamic performance in both directions, and the uncompensated load produces a step disturbance every time the holding brake releases. This reference describes a field-proven compensation method using the SINAMICS supplementary torque setpoint connector input P1513, and shows how to combine it with a single speed/position controller parameter set so the drive behaves as if it were driving a horizontal axis.

1. Problem Definition: Asymmetric Gravity Load Dynamics

A gravity axis (elevator cabin, hoisting winch, press ram, vertical pick-and-place, theatre fly-bar, telescope counterweight) is mechanically a second-order system with a constant disturbance force F_g = m * g acting in the downward direction. The servo motor converts this to a torque disturbance T_g = F_g * r * η, where r is the effective lead or pulley radius and η is the gear/train efficiency (≈0.85–0.95 for helical gearheads, ≈0.95 for planetary, ≈0.98 for direct-drive torque motors).

The consequences in the closed loop are:

  • Up direction: Motor torque must overcome T_g plus acceleration. Required torque T_up = J*α + T_g + T_friction.
  • Down direction: Gravity assists the motion. Required torque T_down = J*α − T_g + T_friction. If T_g > J*α + T_friction the load overruns the motor (runaway) and the speed controller saturates against the negative torque limit.
  • At standstill: The motor must continuously deliver T_g just to hold position. Any controller error produces a position sag/overshoot proportional to the gravity torque.

Directional differences show up as:

Symptom Cause
Position sag after brake release Speed controller integrates the load disturbance slowly
Asymmetric following error Kv-equivalent differs because the load is unidirectional
Slow upward acceleration, fast downward run Gravity adds to motor torque in only one direction
Limit-cycle hunting in down direction Speed controller output saturates against −T_limit
High motor heating at standstill I²R loss for T_g current

2. Solution Strategy: Decouple the Speed Controller from Gravity

The clean engineering solution is to pre-inject the gravitational torque into the torque setpoint chain so the speed controller never sees a constant disturbance. In SINAMICS S120, S210, and V90 the parameter that exposes this injection point is P1513 (supplementary torque setpoint, CI of speed controller). With P1513 the closed-loop motor + load system appears to the speed controller as a pure inertia, and a single gain set (P gain P1460, integral time P1462) provides symmetric behavior in both directions.

Why not two parameter datasets (DDS)? SINAMICS supports up to 8 drive data sets (p0180). A common shortcut is to switch the entire controller gain set with direction. The disadvantage is that the integrator state is discontinuous at the crossover point, which causes a transient. The P1513 feedforward approach keeps a single dataset with continuous integrator state, which is the preferred method on production machines with strict settling requirements.

3. SINAMICS Parameter Chain for Torque Feedforward

The supplementary torque setpoint enters the closed loop between the speed controller output and the torque/current setpoint channel:

P1513 (FFW) Speed ctrl out Torque add Torque limiter Current ctrl

Relevant parameters (SINAMICS S120/S150, firmware V5.x):

Parameter Meaning Typical value
p1513[0] CI: Supplementary torque 1 (BICO source for FFW torque) From r1515 or PLC
p1514[0] CI: Supplementary torque 2 (additional source) 0 (unused)
p1515[0] CI: Supplementary torque 3 0
p1516[0] Scaling of supplementary torque 1 1.0 (Nm per unit)
p1496[0] Scaling of acceleration pre-control 100 %
p1460[0] Speed controller P gain (Kp) 0.3–3.0 Nm/(rad/s)
p1462[0] Speed controller integral time (Tn) 10–50 ms
p1520[0] / p1521[0] Torque limit upper/lower ± motor rated torque or higher
p1530[0] / p1531[0] Power limit mot/regen Motor data

Complete parameter list is documented in the SINAMICS S120/S150 List Manual (firmware V5.2 SP3).

4. Calculating the Gravity Compensation Torque

For a fixed mass the gravity torque is a constant that can be derived from mechanics, but in practice the effective load often varies (unwinding cable, tool changer, multi-product machine). Three methods are used in order of accuracy:

4.1 Mechanical calculation

T_g = (m_payload + m_carrier) * g * r * η_gear / i_gear

where i_gear is the gear ratio motor-to-load. With m = 50 kg, r = 0.05 m (lead-screw pitch 0.05 m, treated as radius-equivalent for force-to-torque), η = 0.9, i = 5:

T_g = 50 * 9.81 * 0.05 * 0.9 / 5 = 4.41 Nm

4.2 Empirical "lift-off" method

  1. Close the holding brake, lock the motor against the load (use p0850 = 0 then back to 1 with brake open inhibit).
  2. Enable the drive with p1545 = 1 (travelling load compensation) and p1513 = 0 initially.
  3. Command a very small positive velocity (e.g. 0.5 rpm) while monitoring r0079 (torque setpoint total) and r0080 (torque actual value).
  4. The torque required to break static friction and begin motion is T_static. The torque needed to maintain 0.5 rpm is T_steady (≈ T_g + friction).

4.3 Automatic measurement with SINAMICS

SINAMICS S120 with the Technology Extension "Flying Saw / Torque Estimator" or the standard function p2195 / p2196 (moment of inertia and load torque estimator) can derive the gravitational torque automatically when the drive executes a controlled motion. The estimator is enabled with p2195 = 6 and reports the result in r2197 (load torque). This r-value can be interconnected to p1513 for self-adapting compensation.

Sign convention: Positive P1513 torque produces positive motor torque (M → speed-up). On a vertical axis with the load pulling the motor downward, the gravity torque acting on the motor is negative when the load is being lowered. The injected value must use the same sign convention as r0079 (positive = motoring). If unsure, set p1513 = +0.5 * T_rated and observe the actual direction; reverse sign if the load drifts downward.

5. Step-by-Step Commissioning Procedure

Prerequisites

  • Drive commissioned per SINAMICS Startup Wizard (motor identification done, current controller optimized).
  • Holding brake wired to SINAMICS BR+/BR- and configured (p1215 = 1 for active brake control).
  • Mechanical safety: gravity axis must be equipped with a second, mechanically independent holding brake or a backstop before any drive enable.
  • STARTER or Startdrive project on a PG/PC with online connection.

Step-by-step

  1. Capture motor data and encoder calibration. Run motor identification (p1910 = 1) and speed controller optimization (p1960 = 1) with the load mechanically locked (use a mechanical clamp or backstop). Do not run auto-tuning with an uncompensated gravity load — the drive will either run away or lift off violently.
  2. Set the safety torque limits. p1520 = +0.8 * p0338 and p1521 = -0.8 * p0338 initially. This limits the runaway current in the down direction during commissioning.
  3. Configure P1513 source. In the expert list, set p1513[0] = r1515[0] (output of the speed controller is the default, so temporarily this looks like a no-op). For an external constant source from the PLC, set p1513[0] = r2050[0] on the appropriate PZD word. For a fixed load you can also drive P1513 with a fixed analog value via p1513[0] = r0755[0] and a potentiometer.
  4. Inject a starting value. Set p1516[0] = 1.0. Bypass the speed controller integrator by enabling the feedforward in BICO and pre-charge the integrator state with the same value: set p1496 = 100 % and use the acceleration pre-control on the position controller. A simple test: enter p1513[0] = 4.4 Nm as a fixed analog value equivalent. In STARTER, the value can be set on the speed controller configuration screen under "Supplementary torque".
  5. Mechanical back-up brake test. With the load suspended, command the holding brake closed (p0858 = 0). The load must not move. The motor holding brake plus the external safety brake together must hold 1.25 * m * g in the worst case (per ISO 13849-1 PLd considerations for suspended loads).
  6. Soft enable. Open the brake (p1215 will manage this), set the speed setpoint to 0 rpm. The drive should hold the load with no audible movement. If the load drifts, increase P1513 magnitude in 5 % steps. If the load rises, decrease.
  7. Tune the speed controller with the load present. Now that the load is decoupled, perform a manual speed step response. Apply a 5 % step on the speed setpoint and record r0060 (actual speed) and r0079 (torque setpoint). Adjust p1460 until overshoot is 5–10 % and rise time matches the application. Adjust p1462 for zero steady-state error in 50–200 ms.
  8. Tune the position controller. With DSC enabled (for high-dynamic S120 with PROFIdrive) or without (for V90 / S210) set p2538 (Kp) and p2540 (Tn). The position controller Kv should be set to roughly 16–33 1/s for high-dynamics hoisting and 8–16 1/s for comfort elevators.
  9. Verify in both directions. Execute a symmetric motion profile (trapezoidal or sinusoidal) and log r0061 (speed actual), r0062 (position actual), and r0080 (torque actual). The current profile should be mirror-symmetric about the speed axis; the torque baseline should be near zero with peaks only during acceleration/deceleration.

6. Auto-Tuning on a Gravity Load

SINAMICS auto-tuning (p1960 = 1 standard, p1960 = 2 with inertia pre-set, p1960 = 3 with vertical axis / suspended load profile since firmware V4.7) executes a controlled motion sequence with sinusoidal current injection to identify J_total and load torque. With a suspended gravity load, the controller must be told about the load, otherwise the auto-tuner assumes a horizontal axis and the integrator will wind up.

Procedure for safe auto-tuning:

  1. Set p0573 = 1 (auto-tuning enabled).
  2. Set p1965 = 1000 (speed positive, in rpm) and p1966 = 50 (dwell) so the motion stays in a small range.
  3. Set p1967 = 0 (positive direction only) initially; the tuner requires the load to be re-supported at end.
  4. Critical: set p1545 = 1 (friction compensation / load torque compensation enabled) and inject an estimated T_g via P1513 before enable. Without this, the auto-tuner will fail with F07902 (motor stalled) or F07905 (mechanics).
  5. Run p1960 = 1. Monitor faults via r0947. The tuner writes new p1460, p1462 and p0342 (ratio of total to motor inertia).

Fault code reference for the tuning procedure (SINAMICS S120 V5.x):

Fault Meaning Action
F07900 Drive: No motor identified Run p1910 first
F07901 Drive: Speed controller output limited Increase p1520/p1521 or check P1513
F07902 Drive: Motor stalled / pull-out Load too heavy, reduce payload or raise torque limits
F07905 Drive: Mechanical oscillation detected Reduce p1460 Kp, add filter p1413
F07907 Auto-tuning aborted by user Re-run after fault clearance
A07979 Auto-tuning: Deviation from calculated inertia > 20 % Re-run, or accept p0342 manually
Manual tuning is often superior for vertical axes because the auto-tuner's load torque model assumes a horizontally-mounted drivetrain. Once P1513 is set correctly the speed controller sees a pure inertia and the result is essentially identical in both directions; a manual step response is the most reliable verification.

7. Acceleration Pre-Control for Symmetric Settling

For best dynamic performance the speed controller should not be the only authority producing acceleration torque. Enable the acceleration pre-control (also called "Kv feedforward") so the position controller directly pre-loads the torque setpoint from the planned trajectory acceleration:

T_accel = J_total * α_profile (where α_profile = dv/dt of the planned motion).

In SINAMICS this is implemented as:

  • p1496[0] = 100 % (pre-control enabled, scaling 1:1)
  • The pre-control value is sourced from the position controller output, e.g. p2532[0] = r1482[0] (speed pre-control from position controller).
  • The pre-control bypasses the I-component, eliminating the following error trapezoid during constant-acceleration phases.

Total torque setpoint viewed by the drive is then:

r0079 = T_speed_controller_out + T_accel_pre + T_P1513_feedforward + T_accel_pre_filter

Where T_P1513_feedforward = T_g for a constant gravity load.

8. Position Controller Setup

With the speed loop and torque feedforward optimized, the position controller reduces to a single gain design rule. The classical formula for a critically-damped / symmetric response:

Kv = 0.25 / Tn_speed (in 1/s)

Where Tn_speed = p1462 in seconds. For p1462 = 30 ms, this gives Kv ≈ 8.3 1/s. In SINAMICS this corresponds to:

p2538 = Kv * p2541 / 1000 with p2541 being the position controller sampling time scaling. Practical values for high-dynamics vertical axes: p2538 = 1.0 – 5.0 depending on units (LU/rev).

Position controller tuning procedure:

  1. Start with p2538 = 0.5 * calculated Kv and verify with a 10 mm step.
  2. Increase p2538 in 20 % steps until overshoot exceeds 5 %.
  3. Reduce to the last stable value; this is the operating point.
  4. Verify symmetric performance by repeating the step in the up and down direction. Difference should be < 10 % in rise time.

9. Edge Cases and Field-Proven Caveats

9.1 Variable load (cable unwinding, tool change)

If the load mass varies by more than 10 % over the operating range, a fixed P1513 value will under- or over-compensate. Two options:

  • Use the load torque estimator (p2195 = 6, result in r2197) and interconnect p1513[0] = r2197[0].
  • Provide a multi-setpoint table indexed by the PLC based on known load cases (e.g. 4 mass values for 4 production recipes).

9.2 Backlash in gearbox or chain

Mechanical backlash produces a dead zone where the load is decoupled from the motor. The P1513 compensation cannot see the backlash and will over-torque. The fix is to pre-tension the drivetrain (anti-backlash nut, dual-chain spring tensioner) and to add a small p1495 torque setpoint filter (low-pass with 5–10 ms) to avoid impulse torques at direction reversal.

9.3 Brake timing

Sequence: brake close at n < p1226 (zero-speed threshold) for p1217 ms (brake closing time) before pulses are cancelled. SINAMICS handles this with the internal sequence control, but the user must set:

  • p1216 = 100 ms (brake release time, depends on brake)
  • p1217 = 100 ms (brake closing time)
  • p1226 = 30 rpm (zero-speed threshold for brake close)

If the P1513 torque is present before the brake fully opens, the motor will jerk the load. Add a brake-release delay so the P1513 torque is ramped in over p1216. This can be done with a PLC ramp on the analog/PZD value feeding P1513.

9.4 Brake wear and torque decay

As the mechanical holding brake wears, the holding torque it provides in addition to the motor torque decreases. A worn brake can mask an under-tuned P1513 because the brake is providing the residual holding force. Periodic check: command 0 velocity with motor energized, measure if the load drifts. If yes, the P1513 compensation is insufficient.

9.5 Vertical axis on S210 / V90 (no PROFIdrive position interface)

On the SINAMICS V90 with PTO mode or S210 with PROFINET, the same P1513 parameter exists in the drive's expert list. The P1513 source can be wired to a fixed value using a BICO interconnect from a parameter that is set via a write from the PLC. The position control then runs in the controller (S7-1500 TO or PLCopen) and the gravity compensation is uploaded as a function of the active load set.

10. Verification Procedure

  1. Static hold test: Enable drive, set velocity setpoint 0, run for 60 s. Position drift must be < encoder resolution (typically < 1 LU).
  2. Step response symmetric test: Command 100 mm upward step, then 100 mm downward step, repeat 5 times. Record r0061 and r0062. Overshoot in both directions must be < 5 % and equal within 10 %.
  3. Following error test: Run a sinusoidal profile of amplitude 1 rev at 0.5 Hz. Peak following error (r2561 if DSC) must be < 1 % of amplitude and identical in both polarities.
  4. Brake-open drop test: Open the brake, measure position drop. Must be < 0.1 mm or as required by application.
  5. Loss-of-feedforward test: Set P1513 = 0. Drive should drift downward with a constant speed (gravity dominates). Reset P1513 — drive should re-hold. This verifies the compensation is doing the work.
  6. Thermal test: Run a duty cycle (e.g. 20 lifts per minute) for 30 min. Motor temperature (r0035) must stay below rated. Excess I²R loss is a sign P1513 is not compensating correctly or torque limits are clipping.

11. Sample Starter / Startdrive Trace Interpretation

A correct tuning trace (trapezoidal profile) shows:

  • Speed (r0061): clean trapezoid, no plateau slope (constant speed reached).
  • Torque (r0080): baseline ≈ 0 at constant speed, +J*α during accel, −J*α during decel. No persistent positive or negative bias.
  • Following error (r2561 with DSC): flat during constant speed (≈ 0), small triangular pulse during accel/decel.

Incorrect signs and what they indicate:

Observation Likely cause
Torque baseline = +T_g at constant speed upward P1513 missing (or wrong sign)
Torque baseline = −T_g at constant speed downward P1513 missing
Upward motion is jerky, downward is smooth P1513 sign reversed
Following error overshoots during accel Position Kp too high; reduce p2538
Oscillation at constant speed Speed Kp too high or no load-side filter (p1413/p1414)

12. Standards and Safety Considerations

Suspended load applications are covered by ISO 12100 for general machine safety and require a risk assessment that typically mandates:

  • Two independent braking systems (motor holding brake + mechanical safety brake or backstop).
  • Functional safety rated to at least SIL 2 / PLd for the brake control, often using the SINAMICS integrated safety functions (STO, SBC) or external safety relay.
  • For personnel transport (elevators, lifting platforms), additional standards apply: EN 81-1, EN 81-20, ASME A17.1, or regional equivalents.

The SINAMICS safety functions required for suspended loads include:

  • STO (Safe Torque Off) — cuts the drive pulses, motor brake closes. Default safe state.
  • SBC (Safe Brake Control) — drives the holding brake to a known safe state with two-channel control.
  • SS1 (Safe Stop 1) — ramp to zero under controlled decel, then STO. Required for category 1 stops.

When STO is triggered, the drive pulses are removed within p9650 (typically 20 ms), but the load is held by the brake. P1513 is no longer effective during STO. This is intentional — the brake must hold the load without motor assistance during the safety state.

13. Practical Tuning Numbers (Reference)

Component Light hoist (5 kg, 0.5 m/s) Medium hoist (50 kg, 1 m/s) Heavy hoist (500 kg, 0.2 m/s)
Motor 1FK7022 (0.5 Nm) 1FK7060 (6 Nm) 1PH8107 (140 Nm)
T_g at motor ~0.3 Nm ~4.4 Nm ~250 Nm
p1460 (Kp_n) 0.05 Nm/rpm 0.5 Nm/rpm 5.0 Nm/rpm
p1462 (Tn_n) 20 ms 30 ms 50 ms
p2538 (Kv) 2.0 1/s 5.0 1/s 3.0 1/s
Filter p1413 0.5 ms 1.0 ms 2.0 ms
P1513 (Nm) 0.3 4.4 250

These values are starting points and must be refined using the procedure in section 5. The full SINAMICS S120 commissioning guide is in the SINAMICS S120/S150 List Manual, and the function description of the speed controller is in the SINAMICS S120 Function Manual.

14. Frequently Asked Questions

What does SINAMICS parameter P1513 do?

P1513 is the BICO source connector for the supplementary torque setpoint 1, fed into the speed controller output. The value is added directly to the torque setpoint, bypassing the speed controller's P and I path. Use it to inject a constant or slowly varying torque (e.g., gravity compensation) so the speed controller only regulates dynamic disturbances.

Why is my servo axis jerky when the brake opens, even with P1513 set?

The P1513 torque is typically applied as a step change at enable, but the mechanical brake takes 50–200 ms to release. The result is the motor pulling against a still-closed brake for a few ms. Ramp the P1513 value in over the brake opening time (p1216), or hold the drive in pre-charge (pulses enabled, output stage off) until the brake is fully open.

Can I use one drive data set (DDS) for up and a second for down?

Yes, but it is not recommended for high-dynamic applications because the integrator state of the speed controller is discontinuous at the switchover, producing a position jump. The single-DDS + P1513 approach gives symmetric behavior with a continuous integrator. If the load is too variable to use a fixed P1513, use the load torque estimator (p2195) to make P1513 self-adapting.

How do I measure the gravity torque if I do not know the payload mass?

Command a small positive velocity (e.g. 1 rpm) and read the actual torque in r0080 once the motion is stable. The value is T_g + T_friction. Repeat in the negative direction and average. Alternatively, set the speed setpoint to 0 and slowly increase P1513 in 0.1 Nm steps until the load just starts to lift (with the brake open). The threshold is T_static + T_g.

Is P1513 the same on SINAMICS V90 and S120?

The parameter index and meaning are identical across S120, S210, S110, G120, and V90 firmware families. The BICO source availability differs — on V90 the source options are limited to internal signals and analog inputs, not full PROFIdrive PZD. For S120 and S210 the full BICO list including r1515, r2050, r2197 is available.

Back to blog