Drive Optimization Guide V3 0 en
Drive Optimization Guide V3 0 en
Drive Optimization Guide V3 0 en
V3.0, 08/2023
https://support.industry.siemens.com/cs/ww/en/view/60593549
Siemens
Industry
Online
Support
Legal information
Legal information
Use of application examples
Application examples illustrate the solution of automation tasks through an interaction of several
components in the form of text, graphics and/or software modules. The application examples are
a free service by Siemens AG and/or a subsidiary of Siemens AG ("Siemens"). They are
non-binding and make no claim to completeness or functionality regarding configuration and
equipment. The application examples merely offer help with typical tasks; they do not constitute
customer-specific solutions. You yourself are responsible for the proper and safe operation of the
products in accordance with applicable regulations and must also check the function of the
respective application example and customize it for your system.
Siemens grants you the non-exclusive, non-sublicensable and non-transferable right to have the
application examples used by technically trained personnel. Any change to the application
examples is your responsibility. Sharing the application examples with third parties or copying the
application examples or excerpts thereof is permitted only in combination with your own products.
The application examples are not required to undergo the customary tests and quality inspections
of a chargeable product; they may have functional and performance defects as well as errors. It is
your responsibility to use them in such a manner that any malfunctions that may occur do not
result in property damage or injury to persons.
Disclaimer of liability
Siemens shall not assume any liability, for any legal reason whatsoever, including, without
limitation, liability for the usability, availability, completeness and freedom from defects of the
application examples as well as for related information, configuration and performance data and
any damage caused thereby. This shall not apply in cases of mandatory liability, for example
under the German Product Liability Act, or in cases of intent, gross negligence, or culpable loss of
life, bodily injury or damage to health, non-compliance with a guarantee, fraudulent
non-disclosure of a defect, or culpable breach of material contractual obligations. Claims for
damages arising from a breach of material contractual obligations shall however be limited to the
© Siemens AG 2023 All rights reserved
foreseeable damage typical of the type of agreement, unless liability arises from intent or gross
negligence or is based on loss of life, bodily injury or damage to health. The foregoing provisions
do not imply any change in the burden of proof to your detriment. You shall indemnify Siemens
against existing or future claims of third parties in this connection except where Siemens is
mandatorily liable.
By using the application examples, you acknowledge that Siemens cannot be held liable for any
damage beyond the liability provisions described.
Other information
Siemens reserves the right to make changes to the application examples at any time without
notice. In case of discrepancies between the suggestions in the application examples and other
Siemens publications such as catalogs, the content of the other documentation shall have
precedence.
The Siemens terms of use (https://support.industry.siemens.com) shall also apply.
Security information
Siemens provides products and solutions with Industrial Security functions that support the secure
operation of plants, systems, machines and networks.
In order to protect plants, systems, machines and networks against cyber threats, it is necessary
to implement – and continuously maintain – a holistic, state-of-the-art industrial security concept.
Siemens’ products and solutions constitute one element of such a concept.
Customers are responsible for preventing unauthorized access to their plants, systems, machines
and networks. Such systems, machines and components should only be connected to an
enterprise network or the Internet if and to the extent such a connection is necessary and only
when appropriate security measures (e.g. firewalls and/or network segmentation) are in place.
For additional information on industrial security measures that may be implemented, please visit
https://www.siemens.com/industrialsecurity.
Siemens’ products and solutions undergo continuous development to make them more secure.
Siemens strongly recommends that product updates are applied as soon as they are available
and that the latest product versions are used. Use of product versions that are no longer
supported, and failure to apply the latest updates may increase customer’s exposure to cyber
threats.
To stay informed about product updates, subscribe to the Siemens Industrial Security RSS Feed
at: https://www.siemens.com/industrialsecurity.
Table of contents
Legal information ..................................................................................................... 2
1 Advices before beginning .............................................................................. 5
2 Fundamentals & general information ............................................................ 6
2.1 Ideal two-mass-system ...................................................................... 6
2.2 Multi-mass-system........................................................................... 10
3 Measurement of the mechanical system ..................................................... 12
3.1 Speed-controlled system frequency response .................................. 12
3.2 Mechanics frequency response........................................................ 17
3.3 Image frequencies ........................................................................... 19
4 Inertia determination of a mechanical system ............................................ 20
4.1 Frequency response ........................................................................ 20
4.2 Velocity profile using the ramp function generator ............................ 22
5 Mot-ID (Motor-Identification) ........................................................................ 24
6 Current Controller optimization ................................................................... 26
6.1 Siemens drives & motors ................................................................. 26
6.2 Third-party drives & motors .............................................................. 26
6.3 Current controller setpoint frequency response ................................ 27
© Siemens AG 2023 All rights reserved
WARNING
The user bears the responsibility and must ensure that no persons or parts
of the mechanics are harmed by carrying out the respective function /
measurement.
Before starting, it must therefore be ensured that the working area is free and
mechanical parts connected to the motor are fixed and sufficiently covered.
Comment traces
Comment all measured traces to be able to compare and evaluate changes later. It
can be also used as a report!
Example:
Axis_1_speedCtrl_Kp=10_Tn=20_Filter_550_500_-20_0
Axis_1_posCtrl_ Kp=10_Tn=20_Filter_550_500_-20_0_Kv=150
© Siemens AG 2023 All rights reserved
Third-party motors
See "SINAMICS S120/S150: Requirements placed on third-party motors"
https://support.industry.siemens.com/cs/ww/en/view/79690594
In the frequency domain the system has the following frequency response:
© Siemens AG 2023 All rights reserved
resonance frequency
This transfer function is the speed control system. The input is a PRBS-Torque-
Signal, the output is the actual speed.
1 𝑐 1 1 1
𝑓𝑇 = ⋅√ 𝑓𝑅 = ⋅ √𝑐 ⋅ ( + )
2𝜋 𝐽𝐿𝑜𝑎𝑑 2𝜋 𝐽𝑀𝑜𝑡𝑜𝑟 𝐽𝐿𝑜𝑎𝑑
The amplitude drops with 20db/ decade. The level of the red parallel lines
represents the inertia that exists in the system (see chapter 4.1). A lower level line
means more inertia compared to a higher-level line.
For the ideal two-mass-system, the total inertia of the system can be read to the
left of the locked rotor frequency, where the transfer function drops with 20dB/dec.
Right of the resonance frequency, the load inertia has decoupled - only the motor
inertia is visible.
The line through the zero point shows that at this frequency even a much higher
inertia appears to be present. The movement of the load appears to be very energy
consuming - it eliminates the movement of the engine.
In contrary, the line through the pole implies, there seems to be little inertia in the
system. In this scenario the motor does not have to use that much energy in order
to move the load - the load pushes the motor. It can lead to a resonance disaster.
© Siemens AG 2023 All rights reserved
Stiffness and damping are reflected in the frequency response in the expression of
the amplitude overshoot and how fast the phase rises from -90 ° to 90 ° with the
locked-rotor-frequency and tilts from 90 ° to -90 ° with the resonance frequency .
Large overshoot and fast turn off phase corresponds to a poorly damped system
(see Figure 2-1with Figure 2-2).
The frequency at -90 ° phase is also the peak of the amplitude overshoot. This is
constant regardless of the attenuation.
In a better damped system, the amplitudes of the pole and zero are much smaller.
The phase does not tilt so fast.
In the real system, the damping corresponds to the friction.
In the time domain, the damping affects only the amplitude of an oscillation, but not
the frequency. (A certain mass with a specific stiff compound oscillates in air at the
same frequency as in oil, but with a different amplitude.)
NOTE The pole frequency in this frequency response corresponds to the locked-rotor-
frequency (zero) in the speed-controlled system!
The amplitude for f < f_T equals 0dB. This corresponds to an amplification of 1.
The phase equals to 0° → no phase shift of the load in relation to the motor. The
movement of the motor corresponds to the movement of the load.
If the load gets excited with f_T, the phase starts to tilt. The load follows with
increasing phase shift up to -180°.
Furthermore, the amplification is bigger than 0dB. The load is excited more than
intended.
If the load gets excited with f > f_T, the load starts to decouple from the motor. The
energy transmission from motor to load reduces, while the phase shift is -180°.
The formulas which are shown above for calculating the locked rotor and
resonance frequencies illustrate the requirements of the mechanical system in
combination with the motor to reach a dynamic control loop with a wide bandwidth.
connection of the mechanics to the motor. Impacts on load side are transferred
to the motor/encoder with less damping effect.
2.2 Multi-mass-system
In reality, a mechanical system consists several pole and zero frequency
combinations, resulting from different parts of the mechanics, e.g. through a gear,
belt, motor encoder, etc.
Figure 2-4 Masses and stiffness distribution in a machine with linear axis and ball screw
© Siemens AG 2023 All rights reserved
e.g. clutch
Even if the assignment of the frequencies to the respective part of the mechanics
requires some experience, it may still be helpful to know them.
In particular, when specific frequencies must be damped by a current setpoint filter.
In case the filtered frequency can move its position can shift depending on the
situation, one would have to choose a filter with a larger bandwidth.
Drive selection: Select the device on which the drive you want to
measure is located (e.g. Drive_Axis_1).
Measuring function: “Speed controlled system (excitation after current
setpoint filter)”
Amplitude: ca. 3% - 5% of reference torque (Default-settings)
→ Too big amplitude may affect the measuring result
negatively! (Limitations can be reached – non-linear
behavior)
→ Too small amplitude excites the system insufficiently
→ Check sound during measurement: audible but not
abnormal
Offset: unequal 0 (Default-settings)
→ To avoid movement around standstill (stick-slip-effect
= static friction to sliding friction change)
→ The offset should be just as big to lift the negative
amplitude above zero speed (avoid reversing of the
motor)
Ramp-up time: duration till offset-speed is reached
to start the measuring out of movement.
NOTE The speed controller must not be set too dynamically for the measurement since
it will then "fight" against the noise signal (measurement signal). If it is too weak,
the measurement will be negatively affected by the controller reaching to the
offset speed level.
For an already optimized speed controller, the reset time should first be
increased by a factor of 10 and then the Kp reduced by a factor of 10.
ATTENTION: If a position controller is active when changing the speed
controller parameter, e.g. because control priority in drive has not yet been
fetched, the position controller gain must first be reduced!
ATTENTION: hanging axes can fall down when the speed controller is too
weak!
© Siemens AG 2023 All rights reserved
Attention: The measurement provides only accurate values in the middle range.
The lower 50% of the trace window and the upper 50% of the bandwidth should be
neglected (red dashed lines).
In the lower frequency range, the sampling is not good enough. In the upper part,
amplitude and phase could be displayed in a wrong way due to aliasing effects.
The noise signal used for the measurement contains 1023 frequencies, linear
distributed over the selected bandwidth. With a bandwidth of 4000Hz, the resulting
gird is 3.9Hz.
NOTE To increase the resolution in the lower frequency range, repeat the measurement
with reduced bandwidth (ca. 600Hz).
Both measurements can be displayed in a superimposed mode.
NOTE Reduce the number of measuring periods to keep the previous measuring time.
The locked rotor frequency is located in the significant area. Both frequency
responses are congruent.
In the low frequency range, the resolution has improved.
The following figure shows a measurement with once more reduced bandwidth:
Figure 3-5 speed-controlled system frequency response with reduced bandwidth (400Hz)
The locked rotor frequency is located on the verge of the significant area. The
frequency responses are not congruent anymore.
Note Choose the bandwidth twice as big as the frequency you want to have correctly
measured/displayed! (Nyquist–Shannon sampling theorem)
© Siemens AG 2023 All rights reserved
Attention The trace is possible only if encoder on the load side exists!
Otherwise the mechanics frequency response phase will not be 0° in the front
area.
The mechanics frequency response explains the locked rotor frequency. According
to the speed controlled system, there is little movement at the locked rotor
frequency, because it is based on the motor encoder. By looking at the mechanics
frequency response and therefore looking at the load encoder, it can be seen that
the load movement is amplified for this frequency.
© Siemens AG 2023 All rights reserved
Figure 4-1 identification of inertia and torsion stiffness from the frequency response
© Siemens AG 2023 All rights reserved
− y[ dB ]
10 20 dB 60 1
J = =
4 ² f 2
y[ dB ]
(2 f ) 10 20 dB
60
This reflects a pair of values consisting of amplitude y [dB] and frequency f [Hz] in a
gradient area of -20 dB/decade!
The values to calculate the total inertial of the system must be determined out of
the area below the first locked-rotor-frequency.
After the first frequency-pair the load has been decoupled. The value of inertia,
which can be calculated out of the area after the resonance frequency,
corresponds to the remaining inertia of the system, the inertia of the motor.
NOTE For determination of the amplitude for the total inertia calculation, trace the
frequency response with lower bandwidth to be able to determine the value
precisely.
Example:
The pair of values y = 14.00dB and f_1 = 59Hz results in the total inertia of the
system J_total = 0.005140kgm².
The pair of values y = 8.98dB and f_2 = 286Hz results in the motor inertia
J_M = 0.001890kgm².
To calculate the torsion stiffness between two masses, the locked rotor frequency,
the resonance frequency and the inertia of the masses has to be known.
Depending on the known values you can use the following equations:
( f R 2 ) 2
cT = 4 ² J M ( f R ² − f T ²) cT = cT = ( f T 2 ) 2 J L
1 1
+
JL JM
© Siemens AG 2023 All rights reserved
NOTE The settings of the function generator needs to be adapted to the mechanics!
In case of a too small signal of r1480 the time of the period could be
decreased. The acceleration-based torque (r1480) is shown in the
measurement; the shape should be similar to a rectangle. Take the average
value, in this case 6.7Nm.
+6.7Nm
- 6.7Nm
© Siemens AG 2023 All rights reserved
The total inertia can be calculated from the torque during acceleration and the
angular acceleration α.
𝑀
𝐽=
∝
5 Mot-ID (Motor-Identification)
The Mot-ID can be used to adapt motor- and control parameters which are based
on data sheet data to the real, motor specific data. The default values which are
preset by inserting a drive can differ from the real motor values.
Using third-party motors, it might be the case that not all motor parameters are
available. In this case the Mot-ID is mandatory.
Furthermore, some motor parameter can only be set correctly if other data are
known. These data must be set by the user before starting the measurement.
The figure below shows the menu of the motor identification. It can be opened in
the project tree under the respective drive in "Rotate & Optimize".
Figure 5-1
© Siemens AG 2023 All rights reserved
NOTICE If the motor has a holding brake, it must be opened before executing
stationary and turning measurement (p1215 = 2).
Before doing so, make absolutely sure that opening the holding brake will
not cause any unwanted movements (for example falling down of a lifting
table).
The proportional gain factor is proportional to the inductance of the motor winding,
the integral time on the current controller clock cycle:
NOTE Motor- and control parameter which are set by inserting a drive with the drive-
wizard or automatic configuration are based on the motor data sheet.
Because of production tolerance it is possible that these data differ to the real
motor data.
Remedy: see chapter Mot-ID (Motor-Identification).
Device selection: Select the device on which the drive you want to
measure is located (e.g. SINAMICS_Integrated).
Measuring function: “Current controller setpoint frequency response (after
current setpoint filter)”
Amplitude: - default -
→ Too big amplitude may affect the measuring result
negatively! (Limitations can be reached – non-linear
behavior)
→ Too small amplitude excites the system insufficiently
→ Check sound during measurement: audible but not
abnormal
Figure 6-2 current controller setpoint frequency response (Kp, Tn: default-values)
© Siemens AG 2023 All rights reserved
The amplitude should stay close to the 0dB line till phase tilt.
NOTE In the curve above, the slight reduction in the amplitude curve is not a too weak
controller gain. The cause here is the locking time of the transistors in the
frequency converters. The time is longer at low voltage modulation. If the
measurement would be executed with higher measurement amplitude, this effect
is no longer visible.
The following trace shows the result of a too low proportional gain factor:
Because of the too low proportional gain factor, the magnitude is only up to 40Hz
close to 0dB.
→ Increase Kp!
© Siemens AG 2023 All rights reserved
Note The integral time results from the current controller sample time. Because of this
the integral time shouldn’t be adapted manually.
+
© Siemens AG 2023 All rights reserved
The variable y(t) for the motor of the speed-controlled axis (output of the speed
controller) is made up of the sum of the P and I components of the PI controller.
The P component is the product of the proportional gain Kp and the control
difference e(t). The I component is the quotient of Kp and the integral time constant
Tn multiplied by the integral of the control difference e(t). Thus, the following
equivalent circuit can be derived for the velocity control:
mLoad
vsetpoint
The control difference is formed from the setpoint velocity vsetpoint and the negative
return of the actual velocity vMot. This control difference is then multiplied on the
one hand by the Kp factor and on the other hand integrated over time and
multiplied by the prefactor Kp/Tn. The sum of these two operations then results in
the manipulated variable Fmot, which has a direct influence on the motor.
vsetpoint
mLoad
According to this figure, the setpoint speed is specified by moving the left vertical
bar (mechanical speed setpoint) horizontally with the desired setpoint speed. The
speed and position deviation between the mechanical speed setpoint and the
© Siemens AG 2023 All rights reserved
motor mass results in a force on the motor mass, which is caused by the damper
and the spring of the speed controller. This force corresponds to the output of the
controller.
Stable unstable
Attention The correct stability has to be evaluated with the open speed control loop!
In SINAMICS trace there is a measuring function for the closed speed
control loop (“Speed controller setpoint frequency response (after speed
setpoint filter)”).
The open speed control loop must be created manually with the
mathematics function.
An open speed control loop means that, in contrast to a closed loop, the negative
return of the actual speed value from the motor encoder is disconnected.
To create the open speed control loop, the speed controller setpoint frequency
response has to be extended with the transfer function.
The coherence between the closed control loop and the open control loop is
characterized by the following formula.
Fo
Fcl =
1 + Fo
If the denominator (of the characteristic equation) equals 0 (Fo = -1), the closed
control loop is instable.
This occurs if the actual value |Fo| = 1 and the phase amounts -180°.
(in logarithmic description: 0dB and -180° phase)
Reverse: to guarantee stability an adequate phase margin φ_R is required while
amplitude amounts 0dB.
If the phase is near -180°, a distance to 0dB is required (amplitude margin).
The bode-diagram of the open speed-control loop looks like this:
amplitude margin
© Siemens AG 2023 All rights reserved
phase margin
There are also important criteria for the closed speed control loop:
Resonance magnification
<3 dB
Characteristic angular frequency f(-3 dB)
frequency: f(-3 dB)
large P-gain.
Characteristic angular frequency (= bandwidth of Frequency is determined in the amplitude
closed contol loop) response at -3dB.
The characteristic frequency should be as high as
possible in order to obtain a high dynamic range
and a short response time.
NOTE In summary, it can be said that the stability-critical points such as amplitude and
phase reserve must be read in the open speed control loop. The dynamics of the
speed controller are assessed with the characteristic angular frequency and the
resonance magnification at the closed speed control circuit.
NOTE To optimize the speed controller gain, the integral component of the PI controller
must be deactivated.
This is done by selecting by setting a very long reset time, e.g. 1000ms.
NOTE The reset time is optimized after the speed controller gain Kp has been
determined.
The typical goal is to set the proportional gain factor high enough to obtain the
required machine dynamic, but at the same time maintain the stability of the control
loop.
The reachable Kp factor is related to the total system inertia (motor + load).
The bigger the total inertia, the higher the reachable/necessary Kp.
NOTE However, the stiffness of the load connection is important as well. The reachable
speed controller gain is directly related to the motor-near inertia, if the locked
rotor frequency and resonance frequency are in the lower frequency aerea..
the inertia which the motor faces, is substantially smaller than the motor inertia
itself (see Chapter 2.1). The load "pushes" the motor at this point, whereby the
Kp is too large. Remedy can be a current setpoint filter (see chapter 7.3).
1
Kp 1000 JM
3
The factor 1/3 is a preventive reserve to avoid mechanical oscillating at first use of
the machine.
The maximum reachable Kp factor without coupled load (inertia close to the motor)
can be approximated by the following equation:
Kp 1000 JM
To get a first reference of the speed control loop, start a measurement with default
Kp setting.
For that, the measuring function “Speed controller setpoint frequency response”
(closed control loop) can be used.
NOTE It is recommended to add the transfer function of the open speed control loop to
evaluate the stability criteria! (see chapter 7.1 and 3.2 (creation of a new bode
function))
Drive selection: Select the device on which the drive you want to
measure is located (e.g. Drive_Axis1/ Drive_Axis2 ).
Measuring function: “Speed controller setpoint frequency response (after
speed setpoint filter)”
→ Additionally: transfer function of open speed
control loop (see chapter 7.1 and 3.2)
Amplitude: -default-
→ Too big amplitude may affect the measuring result
negatively! (Limitations can be reached – non-linear
behavior)
→ Too small amplitude excites the system insufficiently
→ Check sound during measurement: audible but not
abnormal
Note If the Kp is getting increased much during optimization, the amplitude might need
to be reduced.
© Siemens AG 2023 All rights reserved
(red curve: closed speed control loop, blue curve: open speed control loop)
In this trace both curves are congruent, because of the low proportional gain
(feedback loop is interrupted)
The locked rotor frequency (zero) has no effect on the stability of the control loop,
but it affects the reachable system dynamic.
The excitation with resonance frequency (pole) in conjunction with a high
proportional gain (peak near 0dB or above) and low phase margin can lead into an
unstable condition.
From the course of the magnitude in front of the locked rotor frequency, it can be
seen that the proportional gain is way too long.
The closed loop magnitude should stay on the 0dB line up to the locked rotor
frequency.
The big amplitude margin above the resonance frequency shows the possibility to
raise the proportional gain factor as well.
If the factor for the gain increase is displayed over the amplitude in db in
logarithmic representation, the correlation is a straight line. The factor for gain
increasing can be easily determined from the diagram.
Figure 7-9 conversion logarithmic <-> linear
100
10
© Siemens AG 2023 All rights reserved
factor
1
Important values:
0 db 1
3 db 1.4
10 dB 3.16
0.1
20 dB 10
-3 dB 0.7
-10 dB 0.316
-20 dB 0.1
0.01
40 30 20 10 0 10 20 30 40
dB
The open control loop magnitude (blue) reaches the 0dB line. At this point there is
still phase margin left.
Therefore, there is no instability in this case.
In order to reduce this resonance anyway, you could set current setpoint filters.
© Siemens AG 2023 All rights reserved
NOTE The current setpoint filters 1 to 4 are available as standard. You can activate the
current setpoint filters 5 to 10 offline in the object properties of the drive.
Select the desired servo drive in the project navigator and open the "Properties"
© Siemens AG 2023 All rights reserved
menu. Click the "Function modules" tab. Activate the "Extended current setpoint
filters" function module in the function modules selection. Download the data to
the target system.
The extended current setpoint filters 5-10 can be activated via the parameter
p5200[0] and configured with p5201-p5230.
Note If you want to see the effects and transfer functions of the filters, you can also set
the current setpoint filters in Starter. The amplitude and phase frequency
responses of the filters are shown there.
Note While low-pass filters have a better filter efficiency, band stop filters cause less
phase tilt (see graphic above). This has less bad influence on the dynamics of
the speed loop.
To have a look on the filter results, repeat the last measuring (without any changes
at the controller parameter) after setting the filter.
Figure 7-13 measurement 3: speed control loop (current setpoint filter active)
© Siemens AG 2023 All rights reserved
Because the filter the resonance frequency is damped, the trace shows an
adequate amplitude margin. At the open speed control loop without filter (Figure
7-10 measurement 2: speed control loop) the resonance is at +10 dB.
In this control loop, the phase reserve is always too large at the resonance points,
which is why no instability can occur.
In the following, a critical speed control loop will be considered, in which the the
setting of the filters is more relevant.
Figure 7-14 open (blue) and closed (red) speed control loop without filters
Second resonance
first resonance
First resonance (approx. 500Hz): The pole is above 0dB and the phase reaches -
180°. A filter must be set.
Figure 7-16 open (blue) and closed (red) speed controlled loop with both filters
The black graph shows the impact of both bandstops. Their notch in the magnitude
leads to damping of the poles in the open speed-control loop. The first resonance
point is now at -10dB, the second at -17dB. Due to the amplitude reserve in the
open speed-control loop that has now been created, the closed speed control loop
is no longer instable.
© Siemens AG 2023 All rights reserved
To increase the dynamics of the speed control loop again, the Kp value can now
be further enlarged.
NOTE Optimized for the symmetrical optimum, the resonance peak should not be
higher than 3dB.
In the step response, this corresponds to an overshoot of approx. 43% over the
stationary end value. The reset time then corresponds to the rise time of the
purely P-controlled system.
By reducing the integral time, the controller bandwidth got higher again
(characteristic angular frequency f(-3dB) = 48Hz, without Tn: f(-3dB) = 40Hz).
The following closed loop speed controller frequency responses shows four
resonance frequencies, where - at first sight - current setpoint filters might be
required.
First three resonance frequencies are located in the area of the controller
bandwidth (noticeable at the phase margin).
At the fourth resonance frequency the phase margin equals 0°. But the amplitude
margin is still enough.
After raising the proportional gain factor, only the fourth resonance spot gets over
0dB. In this area, there is no (not enough) phase margin. The other poles have
approximatedto the 0dB line.
The reference model is located between the speed command value and the speed
actual value of the speed controller’s integral component (see block diagram).
In this way, a separation of setpoint value controlling and disturbance value
controlling is reached. The reference model delays the command actual value
deviation for the speed controller’s integral component. In this way, only the P-
Component is relevant for command value controlling. The integral component of
the speed controller will be blinded for setpoint changes.
PI-Controller
nset Mset
nact
© Siemens AG 2023 All rights reserved
PI-Controller
nset
nact Mset
Reference nact
model
The typical goal of the reference model is to reduce the amplitude amplification
(caused of a short integral time) in the lower frequency domain of the closed speed
control loop. (The previously adjusted short integral time Tn ensures a good
disturbance control.)
In time domain, the reference model effects a reduction of the actual value
overshoot but retains the integral component.
Using the reference model, a higher position controller gain can be reached.
NOTE The reference model only has an advantage, if speed pre-control (DSC) is used!
To activate the reference model, set the select menu „Reference model“ in the
speed controller menu to ON. By clicking on the now appeared button „Reference
model“, the following parameter can be adjusted:
Natural frequency [p1433]: Start value: frequency at which the phase of the
closed speed control loop reaches -90° for the
first time.
Hint: Set start value slightly smaller. Afterwards,
shift the amplitude reduction (effected by the
reference model) below the amplitude raise by
increasing the natural frequency p1433
Damping [p1434]: default-value; adjust if necessary
Dead time factor [91435]: default-value; adjust if necessary
To optimize the reference model, you can use the measuring function “speed
controller setpoint frequency response (after speed setpoint filter)”.
With increasing the natural frequency, the reference model time constant
decreases. The command value reaches the integrator earlier.
Compared to the current- and speed controller (PI controller,) the position controller
is realized as a P-controller.
and:
• DSC Dynamic Servo Control (active per default)
© Siemens AG 2023 All rights reserved
Advantages of DSC:
• Higher Kv (position controller gain) possible
• Larger bandwidth -> higher dynamic response
• Shorter response times for disturbance characteristic
For a position axis with position control and an assigned SINAMICS drive, the
system sets DCS by default. Deactivation only in offline mode.
Note To use the DSC function, the position controller must be set as P controller.
You can see in the chart below, that the benefit of DSC (higher reachable Kv
© Siemens AG 2023 All rights reserved
factor) is even bigger, the higher the minimum locked rotor frequency of the
systems is.
1666,66
166,66
4 ms position controller clock
16,66
1,66
100
10000
10
1000
1
Attention In practice, only approx. 2/3 of the Kv factor shown in the chart can be
reached!
This is because of the damping, which isn’t considered in this chart.
Attention There is a difference between the servo gain factor unit of the
SIMOTION/SIMATIC position controller and the E-Pos (basic positioner) in
SINAMICS!
This unit differs also in the machine tool control system SINUMERIK.
linear speed
Kv =
following error
The Kv factor unit depends on different units of the parameter mentioned above:
SIMATIC/SIMOTION: Kv = 1s
( MC )
Kv ( MC ) = 16,6 Kv ( EPos / MT )
There is a relation between the reachable servo gain factor and the least locked
rotor frequency of the mechanical system.
f T min 1
Kv( MC ) = 16.6 s
10
f T min 1000
Kv( EPos / MT ) =
10 min
NOTE This is important when the value which was determined by OBT shall be used.
The speed command value is added directly to the position controller output. The
speed controller input is available faster, because the known speed setpoint can by-
pass the position controller.
The additional command value is scaled by thy speed pre-control weighting factor
© Siemens AG 2023 All rights reserved
Kpc.
Note Except for special exceptions, the factor Kpc should be kept 100%!
The remaining function of the position controller using speed pre-control is the
disturbance rejection.
The vTC-time constant is used. Thus, the position setpoint is delayed by the
balancing filter time constant. This prevents overdriving of the speed-setpoint by
the position controller in the acceleration and braking processes. This time
constant will be discussed in more detail in the next chapter.
vTC too short: Position command value delay not sufficient. The position
controller compensates the following error in addition to the speed pre-control. The
result is an overshoot of the speed command value during acceleration and
deceleration (Figure 8-9 Measurement 1: vTC clearly too small).
vTC too long: Delay to strong. System deviation between command value and
actual value negative (position exceeded). The position controller reacts against
the speed pre-control In the trace, a creeping in into the final position is noticeable
(Figure 8-10 Measurement 2: vTC too large).
vTC ideal: The system deviation equals 0. Consequently, the controller output
without pre-control [r60] equals 0 as well (Figure 8-11 Measurement 3 vTC optimal
(vTC from One-Button-Tuning)).
NOTE In this chapter, the position controller optimization is described for TIA/Startdrive.
Clicking on the arrow next to "Optimize values drive" takes you to the one-button
tuning in the drive. After that has been carried out, the determined controller
parameters can be transferred to the axis with "Take values from drive".
The Kv factor is automatically converted into the correct unit.
After activating the master control, the desired dynamic setting must be selected.
Then the optimization can be started.
Only parameters of the speed controller are displayed under Optimization result.
NOTE However, the estimated position control parameters can be viewed in the expert
list of the drive under r5276 and r5277.
The vTC time constant determined in the OBT can now be checked for plausibility.
For this purpose, the following values must be be selected at the beginning of the
verification:
A very dynamic speed profile must be run for the check. Since there is no function
generator available in TIA/Startdrive, this profile must be specified via the axis
control panel with high acceleration, deceleration and high jerk:
The jerk is the time derivative of the acceleration and thus defines the change in
NOTE acceleration. As the jerk decreases, the "corners" become more rounded when
the acceleration changes.
At first, a trace with the actual torque value [r80] and the actual speed value [r61]
must be recorded in the drive.
Trace is started with the "Activate recording" button. The axis must then be
enabled and turned with the trapezoidal via the axis control panel. The torque limit
can be approached by adjusting the parameters velocity, acceleration and jerk.
In this case the torque limit is 5 Nm. Therefore, a maximum value of 4.5Nm would
be possible. A maximum torque of 4Nm is achieved here.
Once the velocity profile has been defined, the measurement to determine the
balancing filter time constant vTC can be carried out.
Based on these parameters, the optimization can be carried out using two
criteria:
The blue curve in Figure 8-9 shows the position controller output with pre-control
value (signal [r62]).
The measurement shows a clear overshoot of the speed setpoint.
The red curve represents the output of the position controller before summation
with the pre-control (signal [r60]).
With deactivated pre-control (Kpc = 0%), the signals [r60] and [r62] are congruent.
© Siemens AG 2023 All rights reserved
With active pre-control (Kpc = 100%), the value of [r60] should ideally approach 0.
If the balancing filter time constant is not well selected, the position controller
"helps" at the beginning of the acceleration and deceleration phases (in addition to
the pre-control). Therefore, there is a deviation of the red curve from the value 0
during acceleration and braking.
The overshooting of r62 and the deviation of 0 from r60 indicate that the balancing
filter time constant is too short.
If the vTC selected is too long, the speed setpoint after filter sneaks into the
setpoint.
At the speed setpoint before the setpoint filter, there is a counteracting due to a
negative control difference.
Measurement 3 shows that the position controller output [r60] is almost equal to 0.
With an optimally selected vTC, the speed setpoint after filter [r62] reaches its end
value quickly and without overshooting.
The validation using the parameter [r62] (speed setpoint after filter) is sometimes
difficult, since the boundary between sneaking in the end value and reaching it
quickly is difficult to identify.
Therefore, the parameter [r60] (position controller output without pre-control value)
is better suited for fine adjustment of the balancing time.
In this way, the optimum balancing filter time constant can be approached, if the
One-Button-Tuning didn’t find a good vTC-time-constant.
NOTICE The controller adaption should be used to linearize the control loop!
Otherwise, every change of the control loop would influence the
superimposed control loop.
The current controller adaption can be found in the current controller settings in the
drive in "open-loop/closed-loop control" (see Fehler! Verweisquelle konnte nicht
gefunden werden.).
One use case is the changing inertia of a winder during the winding process. With
increasing diameter, the speed controller gain must be increased due to an
increasing inertia of the load. With decreasing diameter, the Kp must be reduced.
In both cases, the goal is to adapt the filter without the use of an engineering
system.
The speed controller gets a speed via the pre-control path, without the position
controller has to create it. The current controller gets a torque via the pre-control
path, without it needs to be created in the speed controller.
There are different types of pre-control possible which are either calculated in the
system or by application.
NOTE The acceleration between the speed levels could be relatively high! Sensitive
mechanic should be disconnected before the measurement.
NOTICE During the measurement the axis moves by several rotations in positive or
negative direction.
The user has to make sure the axis can be rotated freely, and no hardware
limitations are violated.
© Siemens AG 2023 All rights reserved
With the Dynamic Servo Control (DSC) function, the position controller in the drive
is executed in the cycle clock of the speed control loop. In the drive, intermediate
setpoints are generated in the speed controller cycle clock from the position
setpoints transferred in the position controller/communication cycle clock via linear
fine interpolation.
With the DSC with spline function, the position controller is executed in the drive in
the cycle clock of the speed control loop. The intermediate values in the drive are
generated via polynomial functions. Intermediate setpoints are also generated for
speed and torque, in addition to position. Using the intermediate setpoints, highly
dynamic motions down to the current controller cycle clock are simulated exactly
and pre-control is possible right down to the torque.
The following requirements must be satisfied for the use of DSC with spline:
• Telegrams 125 and 126 must be supported by the drive
• Consistent setpoints
Position and velocity setpoints must be consistent with each other, i.e. the
setpoint pair must originate from the same cycle clock time of the motion
control. In the setpoint calculation of the technology object, the position
setpoints and the velocity are consistent with each other and are limited to the
maximum values. If the setpoints are modified using compensation values or
limits after the setpoint calculation, the consistency of position and velocity
must be ensured by the user. If the setpoints are defined by the user, the user
must ensure consistency. System variable with DSC spline status display:
servoData.dscSpline
• High-resolution measuring system
DSC with spline requires a high setpoint resolution. The setpoint resolution in
the system is based on the actual value resolution. If the actual value only has
a low resolution, you can increase the setpoint resolution internally. (Set
p0418, e.g. to 18-bit)
To use DSC Spline, the function module "DSC with Spline" must be activate in the
drive.
Now the Spline pre-control can be activated in the axis position control menu:
Beside the standard DSC, the following pre-control types are possible:
• DSC with spline and torque pre-control
• The torque is pre-controlled.
• Speed and position are controlled taking into account the equivalent
time of the current controller in the balancing filter in the drive.
• The torque is calculated in the drive from the acceleration and the
total moment of inertia.
• Balancing of the position setpoint and of the speed setpoint using
the current controller equivalent time (ttc).
To optimize and fine tune the torque pre-control, the speed controller output can be
monitored. During acceleration / deceleration the value should be close to 0.
Adjustments can be done by adapting the load inertia setting in small steps.
Regardless of the method used, the mechanical vibration must be measurable with
a measuring system assigned to the axis. The following methods are available for
this purpose when using APC.
1. APC is using motor variables (motor encoder, current).
2. APC is used together with a direct measuring system.
3. APC is used with an external acceleration sensor installed in the system.
NOTE For detailed information and boundary conditions see SINAMICS S120 Function
Manual Drive Functions
https://support.industry.siemens.com/cs/ww/en/view/109754299
© Siemens AG 2023 All rights reserved
Figure 10-5 Traversing motion without (left side) and with (right side) activation of VIBX
Restrictions:
• This function module is only available for the SERVO drive object
• Induction motors are not suitable for cogging torque compensation
• A motor encoder is always required for the cogging torque compensation
• Transistor-transistor logic or HTL encoders are not suitable for cogging torque
compensation
• The encoder must have absolute information. Thus, it must be an absolute
value encoder or have a clear zero mark or be distance-coded.
• Due to the premature validity message of absolute information, DQI encoders
are only suitable with a bypass (Encoder Data Set switchover after start-up)
• The compensation is then applied to the torque-generating current setpoint. It
is only effective if neither current nor voltage limiting intervenes and the
frequency is not higher than the current controller bandwidth
NOTE For detailed information and boundary conditions see SINAMICS S120 Function
Manual Drive Functions
https://support.industry.siemens.com/cs/ww/en/view/109754299
https://support.industry.siemens.com/cs/ww/en/view/109747826
Background:
Different axes in the machine often have different mechanics. Therefore, the speed
controller and position controller optimization of these axes can be quite different.
© Siemens AG 2023 All rights reserved
NOTE The offset speed in the measuring function must be set to 0.0!
NOTE This procedure is only possible, if all the involved motors are located on the
same CU. Otherwise the motors have to be optimized independently of each
other. In this case the inactive motors act as an additional load for the motor
being optimized.
Usually, the controller settings can be copied from one motor to the others, since
the mechanical system is the same (motor, coupling and mechanics).
© Siemens AG 2023 All rights reserved
12 Torque motors
Basically, the optimization of torque motors follows the same principles described
above in this document. However, dependent on the type and mounting of the
motor, additional steps should be checked/performed in advance.
Torque motors often are so-called component motors, which means the three parts
stator, rotor and encoder are assembled on site. Therefore, a special attention
must be paid to the motor encoder.
Prepare a trace with r63 (= actual speed smoothed) of the drive, which direction
you want to check. Rotate the motor output shaft (if possible just mechanically)
clockwise. r63 should return positive values. In case you receive positive values,
the rotational directions match and you can continue with the encoder adjustment.
If you receive negative values, the encoder actual value must be inverted. You can
do this by changing p410.
NOTE Always invert (or do not invert) p410.0 and p410.1 together. Both parameters
should have the same value!
Encoder adjustment
The function determines the angular commutation offset and writes it in p0431
(angular commutation offset: angular difference between electrical position of
encoder and flux position).
To execute the encoder adjustment, navigate in the project tree to the desired drive
to "Rotate & optimize" > "stationary/rotating measurement". Choose "encoder
adjustment" as measuring type:
NOTE If the measurement fails, the phases of the motor might be connected wrong.
Therefore, check if the phases of the motor are connected properly (U-V-W to U-
V-W).
NOTE Refer also to chapter 5 Mot-ID (Motor-Identification) especially when using third-
party motors.
Controller optimization
In the next step, current, speed and position controller can be optimized like
described in the chapters above.
NOTE For third party motors the current controller adaption should be activated.
Refer to chapter 9.1 Current controller adaption
For SIEMENS motors it is already active.
The following example shows the position controller frequency response recorded
with different measuring amplitudes, 0,1 (orange) and 0,001 (cyan). Both
measurements were recorded with the same position controller gain.
In this example there is a risk, the gain is set too high, because the frequency
response (orange) does not show the desired behavior (cyan).
Figure 12-2 Position controller setpoint frequency response with different amplitudes
© Siemens AG 2023 All rights reserved
OBT can be selected with the parameter p5300 and will be executed with the next
enable of the drive. The axis should be enabled in speed controlled mode.
NOTE The SINAMICS function module “Moment of inertia estimator” must be activated
in order to use the OBT functions.
OBT configuration:
With the parameter p5301 and p5271 single functions of the OBT can be selected
or deselected:
- Determination of Kp and Tn of the speed controller
- Setting the current setpoint filters
- Setting of the speed controller reference model
© Siemens AG 2023 All rights reserved
NOTICE Dependent on the setting in p5301, the axis accelerates with high
dynamics. Be careful with mechanics connected to the motor!
Traversing distance:
The traversing distance for the measurement must be defined in the parameter
p5308. With this the maximum traversing distance can be limited as well. This
specification is on the motorside, possible spindles or gear ratios must be taken
into account.
Dynamic factor:
With the dynamic factor in p5292 the calculated P gain can be influenced.
Notice: If the value is too big, the control loop might be instable!
NOTE The value displayed in r5276 corresponds to the theoretically maximum possible
position controller gain.
The value can be directly used for the E-Pos.
For SIMATIC and SIMOTION, the value must be multiplied by the factor 16.66
(see chapter 8.2).
© Siemens AG 2023 All rights reserved
Also keep in mind, that r5277 (vTc) is displayed in [ms], but SIMATIC and
SIMOTION require the value in [s]!
Boundary conditions:
OBT is basically designed for feed drives / positioning axes. OBT is less suitable
for mechanics with extremely high load inertia conditions.
NOTE For detailed information see SINAMICS S120 Function Manual Drive Functions
https://support.industry.siemens.com/cs/ww/en/view/109754299
The user can influence the tuning result with a dynamic factor dependent on the
mechanical situation (e.g. stiffness). Higher dynamic factor means higher tracking
ability and shorter settling time but also higher possibility of resonance.
NOTE In the "Diagnostics" menu, the user can analyze the control loop using frequency
responses like known from STARTER/SCOUT. A manual tuning is possible.
NOTE For detailed information see SINAMICS V90 PROFINET, SIMOTICS S-1FL6
Operating Instructions
https://support.industry.siemens.com/cs/ww/en/view/109757719
14.2 S210
S210 drives are being configured and optimized using the integrated web server or
TIA-Portal/Startdrive.
One Button Tuning optimizes the drive based on the selected dynamic response
setting:
• "Conservative":
60 % speed control dynamic performance without pre-control
• "Standard":
80 % speed control dynamic performance with torque pre-control
• "Dynamic":
100 % speed control dynamic performance with fast torque pre-control
NOTE If the machine vibrates or creates humming noise at certain speeds after One-
Button-Tuning, then the dynamic response setting is too high. In this case, select
a lower dynamic response and repeat the One-Button-Tuning.
As you can see in the figure, there is a very high rise time.
Furthermore, the system deviation is too high.
→ raise proportional gain factor Kp
The result of raising Kp is a smaller system deviation and a quicker rise time.
For elimination of the persistent system deviation, the integral component of the
control loop has to be activated.
→ reduce integral time
If you continue raising the proportional gain factor, the current controller reacts
faster. At the same time the overshoot increases.
The optimization with a setpoint jump is applied because in a setpoint jump many
frequency components are included. To "get to know" the system which should be
controlled, as many frequencies as possible must be stimulated to see the dynamic
of the speed-controller
The following trace shows the result of an undersized proportional gain factor:
The rise time and the system deviation are too high.
The red curve shows the speed setpoint [r62], the blue curve the actual speed
[r61]. The green curve represents the torque actual value [r80].
© Siemens AG 2023 All rights reserved
Tracing the torque actual value is not required mandatorily, however it should be
noticed.
The parameters r1538 and r1539 in the expert list show the positive and negative
torque limit. Do not exceed these values at any time.
Note Keep a reserve of ca. 10% to the torque limit values to consider machine run in
in the course of time.
The result of raising Kp is a smaller system deviation and a quicker rise time.
© Siemens AG 2023 All rights reserved
For elimination of the persistent system deviation, the integral component of the
control loop has to be activated.
→ reduce integral time
In the following trace the speed controller proportional gain factor is too high:
In the following trace the speed controller proportional gain factor is too high:
The oscillating actual speed is an indication of a too high proportional gain factor.
The control loop is unstable.
→ reduce Kp!
The following described measuring functions add a noise signal to the basic motion
of a higher prior controller. However, this function is only available in
Scout/Starter.
0% !!
100% !!
Device selection: Select the device on which the drive you want to
measure is located (e.g. SINAMICS_Integrated).
Measuring function: “Free measuring function"
The location where the noise signal is added has to be selected below "noise
© Siemens AG 2023 All rights reserved
generator".
NOTE It is essential to ensure that the noise signal is applied to the additional torque
input p1513.
Parameter p1160 (speed setpoint 2) must be scaled with 0%!
Figure 15-13 Settings for measurement of the speed controller setpoint frequency response
© Siemens AG 2023 All rights reserved
100% !!
0% !!
Device selection: Select the device on which the drive you want to
measure is located (e.g. SINAMICS_Integrated).
Measuring function: “Free measuring function"
Signals: - r61 Actual speed
- r62 Speed setpoint
- Transfer function (r62;r61)
Amplitude: approx. 0.1% (the unit can be changed to 1/min with the
checkbox "values in %"
→ Too big amplitude may affect the measuring result
negatively! (Limitations can be reached)
→ Check sound during measurement: audible but not
abnormal
Offset: not necessary, since basic motion already active!
Measuring periods: ca. 20
→ More measuring periods increases the accuracy
(averaging)
→ Affects the measuring time (shorten dependent on
bandwidth)
Bandwidth: 4000Hz
→ Distribution of the measuring points about the
frequency range
The location where the noise signal is added has to be selected below "noise
generator".
NOTE It is essential to ensure that the noise signal is applied to the speed setpoint 2
input p1160.
Parameter p1513 (additional torque) must be scaled with 0%!
Setting a filter on the locked rotor frequency, which causes an amplitude- and phase
amplification, can improve the characteristic angular frequency and therefore the
dynamic of the control loop.
After setting these values, change the filter type to „General filter 2nd order“.
The following traces show the speed controller open (top) and closed control loop
(bottom) with and without filter.
Figure 15-15 open control loop with inverse filter (blue) and without filter (green)
Figure 15-16 closed control loop with inverse filter (red) and without filter (orange)
© Siemens AG 2023 All rights reserved
In both traces, the active filter is identified by a better damping of the locked rotor
frequency.
Furthermore, the controller bandwidth could be increased (from ca. 40 Hz to 65
Hz).
→ The control loop is more dynamic.
Without a filter, the open-loop speed control circuit (Figure 15-17) shows the semi-
stable amplitude curve (no amplitude margin, where the phase already reaches -
180 °). The phase tilts at 400Hz. The control loop would be not stable enough
© Siemens AG 2023 All rights reserved
without band-stop.
With the phase shift filter, the bandwidth could be increased by about 100Hz. It
leads to stability and good closed loop damping.
In this case it would even be possible to increase the gain by about 50%.
The phase shift filter used in this case has a filter frequency of 260 Hz, a bandwidth
of 700 Hz and a notch depth of -10 dB.
NOTE Despite the advantages shown, the filter should be used with care. In case the
resonant frequency would move unfavorably - due to mechanical changes (e.g.,
wear, shrinkage of bearings, etc.), this can lead to instability in the worst case.
Filterposition
© Siemens AG 2023 All rights reserved
16 Appendix
16.1 Service and support
Industry Online Support
Do you have any questions or need assistance?
Siemens Industry Online Support offers round the clock access to our entire
service and support know-how and portfolio.
The Industry Online Support is the central address for information about our
products, solutions and services.
Product information, manuals, downloads, FAQs, application examples and videos
– all information is accessible with just a few mouse clicks:
https://support.industry.siemens.com/
Technical Support
The Technical Support of Siemens Industry provides you fast and competent
support regarding all technical queries with numerous tailor-made offers
– ranging from basic support to individual support contracts. You send queries to
Technical Support via Web form:
www.siemens.com/industry/supportrequest
© Siemens AG 2023 All rights reserved
Service offer
Our range of services includes the following:
• Plant data services
• Spare parts services
• Repair services
• On-site and maintenance services
• Retrofitting and modernization services
• Service programs and contracts
You can find detailed information on our range of services in the service catalog:
https://support.industry.siemens.com/cs/sc