Professional Documents
Culture Documents
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 Introduction ........................................................................................................ 4
1.1 Application description ......................................................................... 4
1.2 Components used ................................................................................ 4
2 Add-on library installation ................................................................................ 6
2.1 Prerequisites ........................................................................................ 6
2.2 Installation guide .................................................................................. 6
2.2.1 Libraries provided as “.pck”-package ................................................... 6
2.2.2 Libraries provided as “.zip”-archive ...................................................... 9
3 Overview of “Control” add-on library ............................................................ 12
3.1 Application scope ............................................................................... 12
3.2 Components overview ........................................................................ 13
4 Detailed description of add-on components ................................................ 16
4.1 Speed-controlled drive
(CTRL_AO_SPEEDCTRLLEDDRIVE_ENC5x) ................................. 16
4.2 Torque-controlled drive (TORQUECTRLLEDDRIVE _ENC50) ......... 19
4.3 Position controller (CTRL_AO_POSCONTROLLER50) .................... 20
4.4 Rate limiter (RATELIM_PROFILE54) ................................................. 23
4.5 Second-order profile generator
© Siemens AG 2023 All rights reserved
(CTRL_AO_SECORDER_PROFILE54) ............................................ 26
4.6 Third-order profile generator
(CTRL_AO_THIRDORDER_PROFILE54) ......................................... 31
5 Using links from Amesim help browser ........................................................ 36
6 Appendix .......................................................................................................... 37
6.1 Service and support ........................................................................... 37
6.2 Industry Mall ....................................................................................... 38
6.3 Application support ............................................................................. 38
6.4 Links and literature ............................................................................. 38
6.5 Change documentation ...................................................................... 38
1 Introduction
1.1 Application description
This manual describes the “Control (2022.1)” add-on library, which extends the
standard libraries of Simcenter Amesim simulation platform with additional models
for control structures commonly applied in production machines.
The further content provided with this application includes:
1. “2D Converting Mechanics (2022.1)” add-on library1, which provides
components for modelling of continuous web machines. The add-on is based
on the Simcenter Amesim standard “2D Mechanical / 2D Converting” library
and in combination with the “2D Mechanical” library, it allows flexible and
modular dynamic simulation of a converting machine.
2. Simcenter Amesim demonstration model, which gives an example on how to
use both add-on libraries, based on the model of the converting test machine.
Figure 1-1 Model built with components from the “Control” add-on
© Siemens AG 2023 All rights reserved
1 See Manual_Amesim_2022_1_2DConverting_Mech_Add_on_Lib_V200.pdf
Limitations
This application example does not provide detailed information on the following
topics:
• Basics of Simcenter Amesim
https://community.sw.siemens.com/s/article/all-you-need-to-know-for-a-good-
start-with-simcenter-amesim
• Simcenter Amesim 2022.1 “1D Mechanical” library2
https://docs.sw.siemens.com/documentation/external/PL20211110541524639/
en-US/2210_library_manuals/libmec/index.html
• Simcenter Amesim 2022.1 “2D Mechanical” library1
https://docs.sw.siemens.com/documentation/external/PL20211110541524639/
en-US/2210_library_manuals/libplm/index.html
• Description of Converting Toolbox
https://support.industry.siemens.com/cs/ww/en/view/109744606
• Description of SIMATIC Winder and Tension Control
https://support.industry.siemens.com/cs/ww/en/view/58565043
1. Unpack the downloaded “.pck”-package file with Amesim GUI using “File →
Open…” (Figure 2-2).
2. In the appeared window use button “Browse…” to specify the directory, where
the library subfolder and demo model shall be unpacked. If you want to open
the demo model directly after unpacking, keep the checkbox “open unpack
directory after unpacking” selected (Figure 2-3).
Figure 2-2 Package opening
© Siemens AG 2023 All rights reserved
3. Check the category path list using “Sketch → Category path list… → Current
path list” after unpacking. The path with unpacked library should appear in the
list of current paths, see Figure 2-4. If not, it is possible to specify the user-
defined path with “User/Corporate/Managed libraries → Browse”, and then add
it with “Add” button as shown in Figure 2-9-Figure 2-10.
– Optional: You can use “Move up”/“Move down” buttons (right-hand pane in
Figure 2-4) or drag-and-drop action to change the order of the libraries in
your path list. It directly defines the sorting of the libraries in Amesim GUI.
4. Press “OK”. The additional library should appear now among standard Amesim
libraries. If not, the library list must be updated using the "Sketch → Update
Categories" function, Figure 2-5.
5. Before using the add-on library for the first time, run the “Library Update
Assistant” with "Tools → Library Update Assistant", see Figure 2-7. This
ensures that the paths in the description files of the library components are up
to date. The library is ready for usage at your PC at this point.
6. Optional: The default color for all additional libraries is black. It is possible to
change the library color using “Tools → Advanced → Color preferences”, see
Figure 2-12. Select library name in the settings window and set the desired
color. All library icons will be then displayed in the selected color.
4. Add the specified library to the path list using button “Add” and apply changes
with button “OK”, Figure 2-10. The additional library should appear now among
© Siemens AG 2023 All rights reserved
standard Amesim libraries. If not, the library list must be updated using the
"Sketch → Update Categories" function, Figure 2-5.
– Optional: You can use “Move up”/“Move down” buttons (right-hand pane)
or drag-and-drop action to change the order of the libraries in your path list.
It directly defines the sorting of the libraries in Amesim GUI.
5. Before using the add-on library for the first time, run the “Library Update
Assistant” using "Tools → Library Update Assistant", see Figure 2-7. This
ensures that the paths in the description files of the library components are up
to date. The library is ready for usage at your PC at this point.
6. Optional: The default color for all additional libraries is black. It is possible to
change the library color using “Tools → Advanced → Color preferences”, see
Figure 2-12. Select library name in the settings window and set the desired
color. All library icons will be then displayed in the selected color.
Figure 3-1 Model of positioning axis with use of add-on components (highlighted area)
3 4 5
1 2
© Siemens AG 2023 All rights reserved
Figure 3-2 Using Simcenter Amesim “Linear Analysis” tool for frequency analysis
Note, control models from the add-on library are continuous and do not consider
the discrete nature of a real hardware. This makes them seamless suited for
analysis tools of model dynamics such as linear analysis package (for instance,
used in Figure 3-2 for frequency response calculation). The primary application
field for these models is the efficient dynamic simulation at system level with
evaluation of interactions between different machine modules, e.g., between
control, electric, pneumatic and mechanic parts.
If you need discrete drive representation, for instance, for coupled co-simulation
with your PLC program, you may apply DriveSim Basic. DriveSim Basic is ready-
to-use model for PROFIdrive-enabled SINAMICS drive and is available as a
functional mock-up unit (FMU) at SIOS. It considers the sample times of drive
control loops and the encoder being used, which allows a more detailed evaluation
of the drive behavior. Refer to DriveSim Basic SIOS entry and application example
Virtual Commissioning with Simcenter Amesim models for more information.
The add-on components can be divided into two groups according to its creation
level:
1. Submodel-based components, which behavior and differential equations are
defined at the programming level with C code. At the block-diagram level they
can be regarded as an atomic unchangeable unit. For modifying of submodel-
based components Amesim provides the tool “Submodel Editor”, where their
structure and source code can be changed. Note, that the source code for the
add-on components of this application is not provided, and they are distributed
as pre-compiled files.
2. Supercomponents, which are created at the block-diagram level by combining
and encapsulation of several submodel-based components to the one
component. If not encrypted, their internal structure can be accessed and
modified at the block-diagram level.
The intention of supercomponents is to cover common combinations of submodel-
based components to avoid sketching the same connections repeatedly. Its
principle is to select a group of components and “shrink-wrap” them into a single
icon. For more information on the supercomponent facility refer to its help page 6.
Note, that the internal structure of not encrypted supercomponents can be
accessed and modified at any time according to the specific needs. Also, the
parameters and variables, which are not exposed to the correspondent panes, can
still be accessed from inside of the component.
6The link can be opened in the Amesim help browser (2022.1) as described in section 5:
qthelp://lmsimagine.lab/ame_dir/doc/html/manuals/en_US/Supercomponent/Supercomponent_t
oc.html
Parameter units
The Amesim parameter pane allows changing parameter units. Required unit
conversions are automatically taken into account in the component C-code. The
behavior is common for all parameters and variables of all components.
Description
The encrypted supercomponents CTRL_AO_SPEEDCTRLLEDDRIVE_ENC50 and
CTRL_AO_SPEEDCTRLLEDDRIVE_51 represent a generic electrical drive with a
closed-loop speed control.
CTRL_AO_SPEEDCTRLLEDDRIVE_ENC50 is simpler comparing to
© Siemens AG 2023 All rights reserved
Figure 4-4 shows an example of low-pass filter with following parameters: cut off
frequency = 500Hz, damping = 0.7.
Low-pass damping
Damping factor of second-order low-pass filter, see Figure 4-4.
Figure 4-5 shows an example of band-stop filter with following parameters: band-
stop blocking frequency = 500Hz, band-stop bandwidth = 500Hz, band-stop notch
depth = -20dB.
Band-stop bandwidth
Width of the stopband, see Figure 4-5.
Description
The encrypted supercomponent TORQUECTRLLEDDRIVE_ENC50 represents a
generic electrical drive with a closed-loop torque control. The model introduces
current control loop dynamics between the torque setpoint and the actual value.
The control loop dynamics can be parameterized by defining control bandwidth and
damping. The model has no internal torque limiting scheme, if it is needed, it
should be added externally.
Description
The supercomponent CTRL_AO_POSCONTROLLER50 represents a model of a
proportional position controller for a rotational drive connected either to a rotary or
a translatory load. The component calculates the motor-side speed setpoint in
rev/min based on the setpoints in a load-side units (can be rotational or linear). The
total block output is a sum of:
1. Output of internal P- position controller, 𝑛𝑐𝑡𝑟𝑙,𝑚𝑜𝑡𝑆 in rev/min.
30
𝑛𝑐𝑡𝑟𝑙,𝑚𝑜𝑡𝑆 = ∙ ∙ (𝑘𝑟𝑒𝑐 𝑙𝑐,𝑙𝑜 𝑑𝑆→𝑚𝑜𝑡𝑆 ∙ 𝑥𝑠𝑒𝑡,𝑙𝑜 𝑑𝑆 −𝑥 𝑐𝑡,𝑚𝑜𝑡𝑆 ). (4.1)
𝜋
With:
𝑃 – gain coefficient of P-controller in 1/s;
𝑘𝑟𝑒𝑐 𝑙𝑐,𝑙𝑜 𝑑𝑆→𝑚𝑜𝑡𝑆 – recalculation coefficient from load-side to motor-side units;
𝑥𝑠𝑒𝑡 – position setpoint in SI units (rad for rotary motion or m for linear motion);
𝑣𝑠𝑒𝑡 – velocity setpoint in SI units (rad/s for rotary motion or m/s for linear motion);
𝑥 𝑐𝑡 – position actual value in SI units7.
Index “motS” stands for motor-side, “loadS” – for load-side.
© Siemens AG 2023 All rights reserved
7Note, the controller calculation is in SI units, but the units for position actual value input is
degree as shown in Figure 4-9 and Figure 4-10
3. “actual position, motor side” – position actual value in deg, motor side.
The component has 1 output:
1. “total drive speed setpoint” – speed setpoint for the speed-controlled system,
motor side, rev/min.
motor revolutions
gear ratio – number of load i_gear_rev_load_sc Real
revolutions
leadscrew pitch for linear leadscrew_sc Real
axis
Description
This supercomponent represents a ramp-function generator, which limits the rate of
change (in other words, first derivative) of an input signal. The Input signal may
have a step shape or be continuous.
Figure 4-12 Example of input (red curve) and output (blue curve) signals of the rate limiter
Figure 4-12 shows an example on input and output signals of the rate limiter
component with the following parameters:
• “Dynamical limits mode” = 1 – from ramp-up and ramp-down times,
• “Ramp-up time” = 1s,
• “Ramp-down time” = 1s,
With 𝑞 𝑐𝑐 – limit on first derivative by positive signal change in pu/s; 𝑞𝑑𝑒𝑐 – limit on
first derivative by negative signal change in pu/s. Index “sc” stands for the exposed
supercomponent parameter, index “applied” – for value applied in the calculation.
2. Limits can be defined indirectly via ramp-up and ramp-down times in sec and
normalization value in pu8:
𝑁 𝑜𝑚,𝑠𝑐
𝑞 𝑐𝑐, 𝑙𝑖𝑒𝑑 = , (4.6)
𝑐𝑐,𝑠𝑐
𝑁 𝑜𝑚
𝑞𝑑𝑒𝑐, 𝑙𝑖𝑒𝑑 = , (4.7)
𝑑𝑒𝑐,𝑠𝑐
With:
𝑁 𝑜𝑚 – normalization value in pu;
𝑐𝑐 – ramp-up time in sec (time in which the absolute value of the output increases
by normalization value 𝑁 𝑜𝑚 );
© Siemens AG 2023 All rights reserved
𝑑𝑒𝑐 – ramp-down time in sec (time in which the absolute value of the output
decreases by normalization value).
Index “sc” stands for the exposed supercomponent parameter, index “applied” – for
value applied in the calculation.
8 pu – physical units
Normalization value
The value used to calculate the maximal allowed rate of change based on ramp-up
and ramp-down times as shown in equations (4.6)-(4.7)..
This parameter is only accessible and has an effect if “dynamical limits mode” ==
“1”.
Ramp-up time
Time in which the absolute value of the output increases by value specified with
parameter "Normalization value". To deactivate the rate limitation, set ramp-up and
ramp-down times to 0 s.
This parameter is only accessible and has an effect if “dynamical limits mode” ==
“1”.
time constant must be strictly positive. Note that the value of this time constant will
affect the response time of the output signal, also by dynamical limits set to zero.
𝑖𝑛𝑝𝑢𝑡 − 𝑜𝑢𝑡𝑝𝑢𝑡
𝑑𝑖𝑛𝑝𝑢𝑡 = , (4.8)
𝑡𝑎𝑢
With 𝑑𝑖𝑛𝑝𝑢𝑡 – estimated derivative, 𝑡𝑎𝑢 – time constant “tau_sc”.
Description
This supercomponent represents a profile generator that limits the first and second
derivatives of a step input signal.
The component calculates the time-optimal profile for a given step setpoint signal,
satisfying desired constraints. The profile is calculated once per new setpoint by
computing the time durations for the stages with a constant second derivative and
for the stage with a constant first derivative.
The calculation of a new setpoint profile with non-zero starting condition is
supported. That means the new setpoint generation can be started before the
previous profile is finished (see parameters description for more details).
Figure 4-16 Example on input (red curve) and output (blue curve) of second-order generator
With 𝑞1 – limit on first derivative in pu/s; 𝑞2 – limit on second derivative in pu/ s2.
Index “sc” stands for the exposed supercomponent parameter, index “applied” – for
value applied in the calculation.
2. Maximum dynamical values can be defined indirectly via desired profile
duration 𝑑𝑒𝑠𝑖𝑟𝑒𝑑 in s. In this case the profile is calculated using two steps:
a. First, based on the parameterized values of 𝑞1,𝑠𝑐 and 𝑞2,𝑠𝑐 the preliminary
profile is calculated. Its duration 𝑟𝑒𝑙𝑖𝑚𝑖 𝑟𝑦 and shape (for instance,
triangle or trapezoid curve for the first derivative of signal) are subject to
𝑞1,𝑠𝑐 and 𝑞2,𝑠𝑐 .
b. Afterwards, the preliminary profile is being “compressed” to fulfill the
desired duration 𝑑𝑒𝑠𝑖𝑟𝑒𝑑 parameter by preserving its shape. The applied
dynamical limits are then established as follows:
𝑟𝑒𝑙𝑖𝑚𝑖 𝑟𝑦
𝑞1, 𝑙𝑖𝑒𝑑 = 𝑞1,𝑠𝑐 ∙ , (4.11)
𝑑𝑒𝑠𝑖𝑟𝑒𝑑
𝑟𝑒𝑙𝑖𝑚𝑖 𝑟𝑦 2
𝑞2, 𝑙𝑖𝑒𝑑 = 𝑞2,𝑠𝑐 ∙ ( ) , (4.12)
𝑑𝑒𝑠𝑖𝑟𝑒𝑑
With:
𝑞1 – limit on first derivative in pu/s;
9The link can be opened in the Amesim help browser (2022.1) as described in section 5:
qthelp://lmsimagine.lab/ame_dir/doc/html/manuals/en_US/TB121_Discontinuity_Handling/TB12
1_Discontinuity_Handling_toc.html
• “1” – input signal is interpreted as relative setpoint (relative to the actual value
of output signal).
Example: If the input is distance in m, the limit of the second derivative is the
maximal acceleration in m/ s2.
This parameter is directly applied for 𝑞2 if “dynamical limits mode” == “0”, and is
indirectly considered as shown in equations (4.11)-(4.12) if “dynamical limits mode”
== “1”.
Description
This supercomponent represents a profile generator, that limits the first three
derivatives of a step input signal.
The component calculates the time-optimal profile for a given step setpoint signal,
satisfying desired constraints. The profile is calculated once per new setpoint by
computing the time durations for the stages with a constant third and second
derivatives as well as stage with a constant first derivative.
Figure 4-20 shows an example on an input and output signal of the third-order
profile generator with the following parameters:
• “Dynamical limits mode” = 0 – directly as 𝑞1 , 𝑞2 and 𝑞3 ,
• “Limit of first derivative” = 5pu/s,
© Siemens AG 2023 All rights reserved
Figure 4-20 Example of input (red curve) and output (blue curve) of the third-order generator
There are two approaches for the definition of dynamical limits, which can be
selected using the parameter “Dynamical limits mode”:
1. Maximum dynamical values can be defined directly with 𝑞1 , 𝑞2 and 𝑞3 :
𝑞1, 𝑙𝑖𝑒𝑑 = 𝑞1,𝑠𝑐 , (4.13)
𝑟𝑒𝑙𝑖𝑚𝑖 𝑟𝑦
𝑞1, 𝑙𝑖𝑒𝑑 = 𝑞1,𝑠𝑐 ∙ , (4.16)
𝑑𝑒𝑠𝑖𝑟𝑒𝑑
𝑟𝑒𝑙𝑖𝑚𝑖 𝑟𝑦 2
𝑞2, 𝑙𝑖𝑒𝑑 = 𝑞2,𝑠𝑐 ∙ ( ) , (4.17)
𝑑𝑒𝑠𝑖𝑟𝑒𝑑
𝑟𝑒𝑙𝑖𝑚𝑖 𝑟𝑦 3
𝑞3, 𝑙𝑖𝑒𝑑 = 𝑞3,𝑠𝑐 ∙ ( ) , (4.18)
𝑑𝑒𝑠𝑖𝑟𝑒𝑑
With:
© Siemens AG 2023 All rights reserved
10The link can be opened in the Amesim help browser (2022.1) as described in section 5:
qthelp://lmsimagine.lab/ame_dir/doc/html/manuals/en_US/TB121_Discontinuity_Handling/TB12
1_Discontinuity_Handling_toc.html
This parameter defines, how the input setpoint signal is interpreted. There are two
possible values:
• “0” – input signal is interpreted as new absolute setpoint.
• “1” – input signal is interpreted as relative setpoint (relative to the actual value
of output signal).
Figure 5-1 Opening the help browser and accessing the address toolbar
© Siemens AG 2023 All rights reserved
6 Appendix
6.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:
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.
Please send queries to Technical Support via Web form:
siemens.com/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
web page:
support.industry.siemens.com/cs/sc
The Siemens Industry Mall is the platform on which the entire siemens Industry
product portfolio is accessible. From the selection of products to the order and the
delivery tracking, the Industry Mall enables the complete purchasing processing –
directly and independently of time and location:
mall.industry.siemens.com