You are on page 1of 38

Simcenter Amesim

2022.1 “Control” Add-


on Library
Siemens
Simcenter Amesim 2022.1 Industry
Online
https://support.industry.siemens.com/cs/ww/en/view/109798524 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.

Simcenter Amesim Control Add-On


Entry-ID: 109798524, V2.0, 01/2023 2
Table of contents

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

Simcenter Amesim Control Add-On


Entry-ID: 109798524, V2.0, 01/2023 3
1 Introduction

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.2 Components used


This application example has been created with the following hardware and
software components:

Table 1-1 Software components


Component Article number
Simcenter Amesim 2022.1

This application example consists of the following components:

Table 1-2 Components


Component File name
Documentation for “Control” Manual_Amesim_2022_1_Control_Add_On_Lib_V200.pdf
Add-on
Documentation for “2D Manual_Amesim_2022_1_2DConverting_Mech_Add_on
Converting Mechanics” Add- _Lib_V200.pdf
on

1 See Manual_Amesim_2022_1_2DConverting_Mech_Add_on_Lib_V200.pdf

Simcenter Amesim Control Add-On


Entry-ID: 109798524, V2.0, 01/2023 4
1 Introduction

Component File name


Add-on library “2D Converting 2022_1_addon_conv_mech.zip
Mechanics (2022.1)”
Add-on library “Control 2022_1_addon_ctrl.zip
(2022.1)”
Simcenter Amesim model of TDConverting_demoMachineModel_22_1_V200.ame
the converting demo machine
Simcenter Amesim package TDConverting_Mech_Ctrl_Add_ons_22_1_V200.pck
containing add-on libraries
and demo model

Remarks on provided Simcenter Amesim files


Depending on the setup already available at your system, you may want to use
different Simcenter Amesim files of this application:
• You should download the “.pck”-package if you did not install the add-on
libraries previously and want to evaluate both of them. It is the easiest and
fastest way to install all provided libraries and run the demo model.
• You may download the add-ons separately using the corresponding “.zip”-
archive. It allows to install only the add-on that you want to look at.
• You can download only the “.ame” file of demonstration model if you have
already installed both add-on libraries previously.
© Siemens AG 2023 All rights reserved

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

2 Access is possible with the existing account

Simcenter Amesim Control Add-On


Entry-ID: 109798524, V2.0, 01/2023 5
2 Add-on library installation

2 Add-on library installation


2.1 Prerequisites
The list of prerequisites for usage of “Control” add-on library:
• Amesim version: 2022.1,
• Amesim compiler: GNU GCC 64-bit compiler (default settings) or GNU GCC
32-bit compiler,
• Amesim libraries: “Signal, Control” library (“libsig”).

Figure 2-1 Compiler settings


© Siemens AG 2023 All rights reserved

The submodel-based components provided with this application (e.g., profile


generator) are pre-compiled using GNU GCC 64-bit and 32-bit compilers under
Windows, and you need to set the same compiler for the library usage. To check
your compiler settings, go to “Tools → Preferences → Compilation → Active
compiler” as shown in Figure 2-1.

2.2 Installation guide


You need to go through the following steps to install the additional libraries to your
Simcenter Amesim:
1. Extend your Simcenter Amesim category path list with additional libraries.
2. Run “Library Update Assistant” for added libraries.
3. Run “Model Update Assistant” for received models which use additional
libraries.
If you are installing the add-on libraries using “.pck”-package, refer to section 2.2.1
for detailed description on each step. If you have downloaded the add-on libraries
as “.zip” files, follow the steps from section 2.2.2. See remarks in section 1.2 if you
are not sure which files you want to use.

2.2.1 Libraries provided as “.pck”-package

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

Simcenter Amesim Control Add-On


Entry-ID: 109798524, V2.0, 01/2023 6
2 Add-on library installation

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

Figure 2-3 Unpacking settings

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.

Simcenter Amesim Control Add-On


Entry-ID: 109798524, V2.0, 01/2023 7
2 Add-on library installation

– 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.

Figure 2-4 Category path list


© Siemens AG 2023 All rights reserved

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.

Figure 2-5 Updating category path list

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.

Figure 2-6 Successfully added library in the category list

Simcenter Amesim Control Add-On


Entry-ID: 109798524, V2.0, 01/2023 8
2 Add-on library installation

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 2-7 Library Update Assistant


© Siemens AG 2023 All rights reserved

2.2.2 Libraries provided as “.zip”-archive

1. Unpack archive with library files in Windows File Explorer.


2. In Amesim go to “Sketch → Category path list → Current path list →
User/Corporate/Managed libraries”, Figure 2-8.

Figure 2-8 Opening category path list

3. Specify path to the parent folder of unpacked library using “User/Corporate/


Managed libraries → Browse”, as shown in Figure 2-9

Simcenter Amesim Control Add-On


Entry-ID: 109798524, V2.0, 01/2023 9
2 Add-on library installation

Figure 2-9 Adding library folder to the user libraries

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.

Figure 2-10 Appending current path list with user libraries

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.

Simcenter Amesim Control Add-On


Entry-ID: 109798524, V2.0, 01/2023 10
2 Add-on library installation

Figure 2-11 Successfully added library in the category list

Figure 2-12 Library color settings


© Siemens AG 2023 All rights reserved

Simcenter Amesim Control Add-On


Entry-ID: 109798524, V2.0, 01/2023 11
3 Overview of “Control” add-on library

3 Overview of “Control” add-on library


3.1 Application scope
The “Control” add-on library provides components for modelling of typical control
structures of productions machine including:
• Generation of continuous setpoint profiles with given dynamical limits.
• Dynamical models for electric drives.
The provided components used in combination with Simcenter Amesim standard
functionality allow modular modelling and analysis of typical machine control
objects like positioning axis, speed axis, cam profiles, etc.

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

For example, model of positioning axis in Figure 3-1 is built with:


• “Third-order profile generator” add-on component for generation of position
setpoint considering dynamic constraints on jerk, acceleration and velocity (“2”
in Figure 3-1).
• “Position controller” add-on component (“3” in Figure 3-1).
• “Speed-controlled drive” add-on component (“4” in Figure 3-1).
• Mechanics components from the standard “1D Mechanics” library (“5” in
Figure 3-1).
The basic logic of user PLC program is modelled using standard “Statechart”
functionality (“1” in Figure 3-1).

Figure 3-2 Using Simcenter Amesim “Linear Analysis” tool for frequency analysis

Simcenter Amesim Control Add-On


Entry-ID: 109798524, V2.0, 01/2023 12
3 Overview of “Control” add-on library

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.

3.2 Components overview


Table 3-1 Provided „Control” components
Component Type3 Submodel name Short description
(CTRL_AO_...)4
Speed- Encrypted SPEEDCTRLLEDDRIVE Electric drive with
controlled supercomponent5 _ENC5x closed-loop speed
drive control
Torque- Encrypted TORQUECTRLLEDDRIVE Electric drive with
© Siemens AG 2023 All rights reserved

controlled supercomponent _ENC50 closed-loop torque


drive control
Position Supercomponent POSCONTROLLER50 Position controller for
controller rotary or linear axis
Rate limiter Supercomponent RATELIM_PROFILE54 Setpoint generation
with limit on first
derivative
Second-order Supercomponent SECORDER_PROFILE54 Setpoint generation
profile with limit on first two
generator derivatives
Third-order Supercomponent THIRDORDER Setpoint generation
profile _PROFILE54 with limit on first three
generator derivatives
Internal Submodel-based SECORDER_CALC Utility used at second-
calculation of _UTILITY54 order profile generator
second-order
profile
Internal Submodel-based THIRDORDER_CALC Utility used at third-
calculation of _UTILITY54 order profile generator
third-order
profile

3 Difference between supercomponents and submodel-based components is shown in


Figure 3-4
4 Full submodel name concatenates to e.g. CTRL_AO_POSCONTROLLER50
5 You will not have access to the internal structure of an encrypted component

Simcenter Amesim Control Add-On


Entry-ID: 109798524, V2.0, 01/2023 13
3 Overview of “Control” add-on library

Figure 3-3 “Control” components provided as additional blocks

Internal structure of the provided components


© Siemens AG 2023 All rights reserved

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

Simcenter Amesim Control Add-On


Entry-ID: 109798524, V2.0, 01/2023 14
3 Overview of “Control” add-on library

Figure 3-4 Submodel-based components and supercomponents

C-Code of submodel Combined submodel-based components

Submodel-based component Supercomponent


© Siemens AG 2023 All rights reserved

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.

NOTICE Double check unit settings for each parameter value


By adding the component from library to sketch, its units can differ from listed in
the table in this documentation (e.g. mm instead of m). Usage of wrong
parameter units can cause misleading simulation results.

Simcenter Amesim Control Add-On


Entry-ID: 109798524, V2.0, 01/2023 15
4 Detailed description of add-on components

4 Detailed description of add-on


components
4.1 Speed-controlled drive
(CTRL_AO_SPEEDCTRLLEDDRIVE_ENC5x)
Icon
Figure 4-1 Speed-controlled drive icon

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

CTRL_AO_SPEEDCTRLLEDDRIVE_ENC51 and therefore needs less


computation time during simulation. The simpler component includes:
• Continuous PI speed controller with backtracking anti-windup scheme,
• Inputs for variable torque limit,
• Torque pre-control input.
CTRL_AO_SPEEDCTRLLEDDRIVE_ENC51 is slightly more complex and
additionally includes:
• Current setpoint filters (up to four activatable current setpoint filters: one low-
pass filter and three band-stop filters),
• Current control loop dynamics (parameterized by defining control bandwidth
and damping).

Ports, external variables, parameters


The components have 5 signal inputs:
1. “upper torque limit, Nm”
2. “torque pre-control, Nm”
3. “lower torque limit, Nm”
4. “speed setpoint, rev/min” – setpoint for drive motor speed
5. “speed actual value, rev/min” – actual speed of drive motor shaft
The components have 1 signal output:
1. “torque actual value, Nm” – actual torque of drive motor

Simcenter Amesim Control Add-On


Entry-ID: 109798524, V2.0, 01/2023 16
4 Detailed description of add-on components

Figure 4-2 Ports and external variables of speed-controlled drive

Table 4-1 Parameters of speed-controlled drive


© Siemens AG 2023 All rights reserved

Title, units Name Parameter type


speed controller integral Tnn Real
time, s
speed controller P gain, Kpn Real
Nm/(rad/s)
anti-wind-up tracking time Taw Real
constant, s
current control loop damping Real
damping
current control loop omega omega Real
(bandwidth), rad/s

Table 4-2 Parameters of low-pass filter (filter 1)


Title, units Name Parameter type
filter (low-pass) activation F1Active Integer
low-pass cut off frequency, fCuttOff1 Real
Hz
low-pass damping damp1 Real

Table 4-3 Parameters of band-stop filters (filters 2…4)


Title, units Name Parameter type
filter (band-stop) activation FActive Integer
band-stop bandwidth, Hz bandwidth Real
band-stop blocking fBlocking Real
frequency, Hz
band-stop notch depth, dB notchDepth Real

Simcenter Amesim Control Add-On


Entry-ID: 109798524, V2.0, 01/2023 17
4 Detailed description of add-on components

Speed controller integral time


Integral time of PI speed controller (see Figure 4-3). You can switch off the integral
part by setting Tnn to zero.

Speed controller P gain


Proportional gain factor of PI speed controller (see Figure 4-3).

Anti-wind-up tracking time constant


Time constant for backtracking anti-wind-up structure. (see Figure 4-3)

Figure 4-3 PI Controller coefficients parameterization


© Siemens AG 2023 All rights reserved

Current control loop damping


Modal damping of closed current control loop.

Current control loop omega (bandwidth)


Bandwidth of closed current control loop.

Filter (low-pass) activation


Parameter for activation of a second-order low-pass filter. There are two possible
values:
• “1” - filter active,
• “0” - filter not active.

Figure 4-4 Example of low-pass filter

Figure 4-4 shows an example of low-pass filter with following parameters: cut off
frequency = 500Hz, damping = 0.7.

Simcenter Amesim Control Add-On


Entry-ID: 109798524, V2.0, 01/2023 18
4 Detailed description of add-on components

Low-pass cut off frequency


Cut-off frequency for second-order low-pass filter, see Figure 4-4.

Low-pass damping
Damping factor of second-order low-pass filter, see Figure 4-4.

Filter (band-stop) activation


Parameter for activation of a band-stop filter. There are two meaningful values:
• “1” - filter active,
• “0” - filter not active.

Figure 4-5 Example of band-stop filter


© Siemens AG 2023 All rights reserved

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 blocking frequency


Frequency to be suppressed, see Figure 4-5.

Band-stop bandwidth
Width of the stopband, see Figure 4-5.

Band-stop notch depth


Attenuation depth, see Figure 4-5.

4.2 Torque-controlled drive (TORQUECTRLLEDDRIVE


_ENC50)
Icon
Figure 4-6 Torque-controlled drive icon

Simcenter Amesim Control Add-On


Entry-ID: 109798524, V2.0, 01/2023 19
4 Detailed description of add-on components

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.

Ports, external variables, parameters


The component has 1 input:
1. “torque setpoint, Nm” – total torque setpoint for drive in Nm.
The component has 1 output:
1. “torque actual value, Nm” – actual value of drive torque in Nm.

Figure 4-7 Ports and external variables of torque-controlled drive


© Siemens AG 2023 All rights reserved

Table 4-4 Parameters of torque-controlled drive


Title, units Name Parameter type
current control loop: damping Real
damping
current control loop: omega, omega Real
rad/s

Current control loop: damping


Modal damping of closed current control loop.

Current control loop: omega (bandwidth in rad/s)


Bandwidth of closed current control loop.

4.3 Position controller (CTRL_AO_POSCONTROLLER50)


Icon
Figure 4-8 Position controller icon

Simcenter Amesim Control Add-On


Entry-ID: 109798524, V2.0, 01/2023 20
4 Detailed description of add-on components

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)
𝜋

2. Speed pre-control part 𝑛 𝑟𝑒−𝑐𝑡𝑟𝑙,𝑚𝑜𝑡𝑆 in rev/min, which is calculated based on


the velocity speed setpoint input in load-side units.
30
𝑛 𝑟𝑒−𝑐𝑡𝑟𝑙,𝑚𝑜𝑡𝑆 = ∙ 𝑘𝑟𝑒𝑐 𝑙𝑐,𝑙𝑜 𝑑𝑆→𝑚𝑜𝑡𝑆 ∙ 𝑣𝑠𝑒𝑡,𝑙𝑜 𝑑𝑆 . (4.2)
𝜋

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

Internal structure of the supercomponent


The components contains the calculations described in equations (4.1), (4.2) plus
the saturation block SAT0, that limits the total speed setpoint.

Figure 4-9 Internal structure of CTRL_AO_POSCONTROLLER50

Ports, external variables, parameters


The component has 3 inputs:
1. “position setpoint, load side” – setpoint for position controller in m or rad
depending on the axis’ motion type, load side.
2. “velocity setpoint, load side” – velocity setpoint in m/s or rad/s depending on
the axis’ motion type, load.

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

Simcenter Amesim Control Add-On


Entry-ID: 109798524, V2.0, 01/2023 21
4 Detailed description of add-on components

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.

Figure 4-10 Ports and external variables of position controller

Table 4-5 Parameters of position controller


Title, units Name Parameter type
axis' type of motion at load axisType_sc Integer
side
proportional gain of position Kp_posCtrl_sc Real
controller
limit of speed setpoint for nMax_posCtrlOut_sc Real
speed controller, motor side
gear ratio – number of i_gear_rev_mot_sc Real
© Siemens AG 2023 All rights reserved

motor revolutions
gear ratio – number of load i_gear_rev_load_sc Real
revolutions
leadscrew pitch for linear leadscrew_sc Real
axis

Axis' type of motion at load side


The parameter defines unit conversion inside the controller component. There are
two possible values:
• “0” – rotary. Use this value if a position-controlled drive is connected to a rotary
load. In this case the position setpoint is interpreted in rad and velocity setpoint
in rad/s, load-side.
• “1” – linear. Use this value if a position-controlled drive is connected to a
translatory load (e.g. via leadscrew). In this case the position setpoint is
interpreted in m and velocity setpoint in m/s, load-side.

Proportional gain of position controller


Gain of P-Controller in 1/s.

Limit of speed setpoint for speed controller, motor side


Maximal value for the total velocity setpoint at the component output, rev/min,
motor-side.

Gear ratio – number of motor revolutions, number of load revolutions


The parameters define the gear ratio 𝑖 between rotary values at motor- and load-
side:
𝑁𝑢𝑚𝑚𝑜𝑡𝑜𝑟
𝑖= , (4.3)
𝑁𝑢𝑚𝑙𝑜 𝑑

Simcenter Amesim Control Add-On


Entry-ID: 109798524, V2.0, 01/2023 22
4 Detailed description of add-on components

With 𝑁𝑢𝑚𝑚𝑜𝑡𝑜𝑟 – number of motor revolutions, 𝑁𝑢𝑚𝑙𝑜 𝑑 – number of load


revolutions.
The gear ratio 𝑖 is part of coefficient 𝑘𝑟𝑒𝑐 𝑙𝑐,𝑙𝑜 𝑑𝑆→𝑚𝑜𝑡𝑆 calculation, which is then
used in equations (4.1), (4.2).

Leadscrew pitch for linear axis


This parameter is only accessible and has an effect for linear axes (“axis’ type” ==
“1”).
The parameter defines the value of translatory travel at load side, which occurs by
one shaft revolution at load side. For a leadscrew such relationship corresponds to
the leadscrew pitch. The value is used in the recalculation coefficient 𝑘𝑟𝑒𝑐 𝑙𝑐,𝑙→𝑚
from equations (4.1), (4.2).

4.4 Rate limiter (RATELIM_PROFILE54)


Icon
Figure 4-11 Rate limiter icon
© Siemens AG 2023 All rights reserved

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,

Simcenter Amesim Control Add-On


Entry-ID: 109798524, V2.0, 01/2023 23
4 Detailed description of add-on components

• “Normalization value” = 1pu.


There are two approaches for the definition of rate limits, which can be selected
using parameter “Dynamical limits mode”:
1. Limits can be defined directly in pu/s:
𝑞 𝑐𝑐, 𝑙𝑖𝑒𝑑 =𝑞 𝑐𝑐,𝑠𝑐 , (4.4)

𝑞𝑑𝑒𝑐, 𝑙𝑖𝑒𝑑 = 𝑞𝑑𝑒𝑐,𝑠𝑐 , (4.5)

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.

Internal structure of the supercomponent


The supercomponent contains a rate limiter (RATELIM0) for limiting the signal rate
of change. The local parameters of the standard block RATELIM0 are recalculated
based on the selected “Dynamical limits mode”.

Figure 4-13 Internal structure of RATELIM_PROFILE54

Ports, external variables, parameters


The component has 1 input:
1. “input signal, pu” – input signal, whose rate of change must be limited, in
physical units.

8 pu – physical units

Simcenter Amesim Control Add-On


Entry-ID: 109798524, V2.0, 01/2023 24
4 Detailed description of add-on components

The component has 2 outputs:


1. “output signal with limited first derivative, pu” – output signal with limited rate of
change, in physical units.
2. “derivative of output” – first derivative of output signal, in physical units per
second.

Figure 4-14 Ports and external variables of rate limiter

Table 4-6 Parameters of rate limiter


Title, units Name Parameter type
dynamical limits mode q_TPos_mode_sc Integer
ramp-up limit of first q1_acc_in_sc Real
derivative, pu/s
ramp-down limit of first q1_dec_in_sc Real
derivative, pu/s
normalization value, pu nomialValue_sc Real
© Siemens AG 2023 All rights reserved

ramp-up time, s rampUpValue_sc Real


ramp-down time, s rampDownValue_sc Real
time constant for derivative tau_sc Real
calculation, s

Dynamical limits mode


This parameter allows to select the approach for the definition of rate limits. There
are two possible values:
• “0” – rate limits are defined directly using parameters “q1_acc_in_sc” and
“q1_dec_in_sc”,
• “1” – rate limits are defined indirectly using parameters “nomialValue_sc”,
“rampUpValue_sc” and “rampDownValue_sc” as shown in equations (4.6)-
(4.7).
Note, the value of the parameter “dynamical limits mode” affects the visibility of
other parameters – only parameters of the selected approach are visible.

Ramp-up limit of first derivative


Limit on first derivation of the signal by positive signal change, absolute value in
pu/s. To deactivate the rate limitation, set ramp-up and ramp-down limits to 0 pu/s.
This parameter is only accessible and has an effect if “dynamical limits mode” ==
“0”.

Ramp-down limit of first derivative


Limit on first derivation of the signal by negative signal change, absolute value in
pu/s. To deactivate the rate limitation, set ramp-up and ramp-down limits to 0 pu/s.
This parameter is only accessible and has an effect if “dynamical limits mode” ==
“0”.

Simcenter Amesim Control Add-On


Entry-ID: 109798524, V2.0, 01/2023 25
4 Detailed description of add-on components

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”.

Ramp-down time constant


Time in which the absolute value of the output decreases 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 for derivative calculation


Time constant for estimation of input derivative according to equation (4.6). The
© Siemens AG 2023 All rights reserved

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”.

4.5 Second-order profile generator


(CTRL_AO_SECORDER_PROFILE54)
Icon
Figure 4-15 Second-order profile generator icon

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).

Simcenter Amesim Control Add-On


Entry-ID: 109798524, V2.0, 01/2023 26
4 Detailed description of add-on components

Figure 4-16 Example on input (red curve) and output (blue curve) of second-order generator

Figure 4-16 shows an example on input and output signals of a second-order


profile generator with the following parameters:
• “Dynamical limits mode” = 0 – directly as 𝑞1 and 𝑞2 ,
• “Limit of first derivative” = 5pu/s,
• “Limit of second derivative” = 5pu/s2,
© Siemens AG 2023 All rights reserved

• “Expected minimum amplitude of step change” = 0.0001pu,


• “Expected minimum duration of constant signal part” = 0.001s.
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 and 𝑞2 :
𝑞1, 𝑙𝑖𝑒𝑑 = 𝑞1,𝑠𝑐 , (4.9)

𝑞2, 𝑙𝑖𝑒𝑑 = 𝑞2,𝑠𝑐 , (4.10)

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;

Simcenter Amesim Control Add-On


Entry-ID: 109798524, V2.0, 01/2023 27
4 Detailed description of add-on components

𝑞2 – limit on second derivative in pu/s2;


𝑟𝑒𝑙𝑖𝑚𝑖 𝑟𝑦 – duration of profile in seconds if 𝑞1,𝑠𝑐 and 𝑞2,𝑠𝑐 would be applied;
𝑑𝑒𝑠𝑖𝑟𝑒𝑑 – parameterized desired profile duration in seconds.
Index “sc” stands for the exposed supercomponent parameter, index “applied” – for
value applied in the calculation.

Internal structure of the supercomponent


The supercomponent contains the block SECORDER_CALC_UTILITY54, written in
C, which calculates the time intervals for each profile stage. The time values are
being recalculated each time as a step change of input signal occurs. The step of
input signal is recognized with help of a differentiation block (DIF1 – approximation
of the derivative of the input by using a time constant).
The comparison logic at the right-hand circuit part, is used for discontinuity
handling. It generates the discontinuity flag at the known time of the profile stage
changing. For more information on discontinuity handling in Simcenter Amesim
refer to its help page9.

Figure 4-17 Internal structure of CTRL_AO_SECORDER_PROFILE54


© Siemens AG 2023 All rights reserved

Ports, external variables, parameters


The component has 1 input:
1. “input signal, pu”: input step signal, whose first two derivatives must be limited,
in physical units.
The component has 3 outputs:
1. “output signal with limited first two derivatives, pu”: output signal with limited
first and second derivatives, in physical units.
2. “limited first derivative of signal” – first derivative of output signal, in physical
units per second.
3. “limited second derivative of signal” – second derivative of output signal, in
physical units per second squared.

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

Simcenter Amesim Control Add-On


Entry-ID: 109798524, V2.0, 01/2023 28
4 Detailed description of add-on components

Figure 4-18 Ports and external variables of second-order profile generator

Table 4-7 Parameters of second-order profile generator


Title, units Name Parameter type
dynamical limits mode q_TPos_mode_sc Integer
© Siemens AG 2023 All rights reserved

setpoint processing mode abs_rel_task_mode_sc Integer


behavior by new setpoint before intermTaskBehave_sc Enumeration
current profile end
limit of first derivative, pu/s q1_sc Real
limit of second derivative, pu/s**2 q2_sc Real
desired profile duration, s TPos_desired_sc Real
expected minimum amplitude of hMinStepAmplitude_sc Real
step change for input signal, pu
expected minimum duration of TMin_sc Real
constant signal part between step
changes, s
time epsilon on stage durations, s timeEps_sc Real

Dynamical limits mode


The parameter allows to select the approach for the definition of dynamical limits.
There are two possible values:
• “0” – dynamical limits are defined directly using parameters “q1_sc” and
“q2_sc”.
• “1” – dynamical limits are defined indirectly using parameters
“TPos_desired_sc”, “q1_sc” and “q2_sc” as shown in equations (4.11)-(4.12).
The approach cannot be combined with “intermTaskBehave_sc” = “start new
on fly”.

Setpoint processing mode


This parameter defines, how the input setpoint signal is interpreted. There are two
possible values:
• “0” – input signal is interpreted as new absolute setpoint.

Simcenter Amesim Control Add-On


Entry-ID: 109798524, V2.0, 01/2023 29
4 Detailed description of add-on components

• “1” – input signal is interpreted as relative setpoint (relative to the actual value
of output signal).

Behavior by new setpoint before current profile end


This parameter defines, how the profile generator reacts, if a new setpoint is
received before the current one is finalized. There are two possible values:
• “ignore” – the current setpoint is finalized, the new setpoint is skipped.
• “start new on fly” – block start the smooth transition between the current
setpoint and new one immediately considering parameterized dynamical limits
for 𝑞1 and 𝑞2 . The approach cannot be combined with “q_TPos_mode_sc” = “1”
(indirect dynamical limits definition via profile duration).

Limit of first derivative


Absolute value for first derivative limit, value must be non-negative.
Example: If the input is distance in m, the limit of the first derivative is the maximal
velocity in m/s.
This parameter is directly applied for 𝑞1 if “dynamical limits mode” == “0”, and is
indirectly considered as shown in equations (4.11)-(4.12) if “dynamical limits mode”
== “1”.

Limit of second derivative


Absolute value for second derivative limit, value must be non-negative.
© Siemens AG 2023 All rights reserved

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”.

Desired profile duration


This parameter defines the desired duration of the generated profile with limited
first two derivatives.
This parameter has an effect only if “dynamical limits mode” == “1” as shown in
equations (4.11)-(4.12).

Expected minimum amplitude of step change for input signal


This value multiplied with 0.8 defines the minimal change of the input signal
amplitude, which is considered as a new setpoint step. If the signal amplitude
change is greater than this value, the calculation of a new time-optimal profile will
be started.

Expected minimum duration of constant signal part between step changes


This value defines the time constant of the differentiation block, which recognizes
the step change of the input signal. If it is set too large, the input signal change
may be not recognized.

Time epsilon on stage durations


This value defines the minimal duration of a profile stage (e.g., a stage with
constant positive second derivative) which will be regarded as non-zero. All stages
smaller than this value will be ignored.

Simcenter Amesim Control Add-On


Entry-ID: 109798524, V2.0, 01/2023 30
4 Detailed description of add-on components

4.6 Third-order profile generator


(CTRL_AO_THIRDORDER_PROFILE54)
Icon
Figure 4-19 Third-order profile generator icon

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

• “Limit of second derivative” = 5pu/s2,


• “Limit of third derivative” = 10pu/s3,
• “Expected minimum amplitude of step change” = 0.0001pu,
• “Expected minimum duration of constant signal part” = 0.001s.

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)

𝑞2, 𝑙𝑖𝑒𝑑 = 𝑞2,𝑠𝑐 , (4.14)

Simcenter Amesim Control Add-On


Entry-ID: 109798524, V2.0, 01/2023 31
4 Detailed description of add-on components

𝑞3, 𝑙𝑖𝑒𝑑 = 𝑞3,𝑠𝑐 , (4.15)

With 𝑞1 – limit on first derivative in pu/s; 𝑞2 – limit on second derivative in pu/s2, 𝑞3


– limit on third derivative in pu/s3. Index “sc” stands for the exposed parameter of
supercomponent, index “applied” – for value applied in the calculation.
2. Maximum values can be defined indirectly via desired profile duration 𝑑𝑒𝑠𝑖𝑟𝑒𝑑
in seconds. In this case the profile is calculated using two steps:
a. First, based on the parameterized values of 𝑞1,𝑠𝑐 , 𝑞2,𝑠𝑐 and 𝑞3,𝑠𝑐 the
preliminary profile is calculated. Its duration 𝑟𝑒𝑙𝑖𝑚𝑖 𝑟𝑦 and shape (for
instance, smoothed triangle or trapezoid curve for the first derivative of
signal) are subject to 𝑞1,𝑠𝑐 , 𝑞2,𝑠𝑐 and 𝑞3,𝑠𝑐 .
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.16)
𝑑𝑒𝑠𝑖𝑟𝑒𝑑

𝑟𝑒𝑙𝑖𝑚𝑖 𝑟𝑦 2
𝑞2, 𝑙𝑖𝑒𝑑 = 𝑞2,𝑠𝑐 ∙ ( ) , (4.17)
𝑑𝑒𝑠𝑖𝑟𝑒𝑑

𝑟𝑒𝑙𝑖𝑚𝑖 𝑟𝑦 3
𝑞3, 𝑙𝑖𝑒𝑑 = 𝑞3,𝑠𝑐 ∙ ( ) , (4.18)
𝑑𝑒𝑠𝑖𝑟𝑒𝑑

With:
© Siemens AG 2023 All rights reserved

𝑞1 – limit on first derivative in pu/s;


𝑞2 – limit on second derivative in pu/s2;
𝑞3 – limit on third derivative in pu/s3;
𝑟𝑒𝑙𝑖𝑚𝑖 𝑟𝑦 – duration of profile in seconds if 𝑞1,𝑠𝑐 , 𝑞2,𝑠𝑐 and 𝑞3,𝑠𝑐 would be applied;
𝑑𝑒𝑠𝑖𝑟𝑒𝑑 – parameterized desired profile duration in seconds.
Index “sc” stands for the exposed supercomponent parameter, index “applied” – for
value applied in the calculation.

Internal structure of the supercomponent


The supercomponent contains the block THIRDORDER_CALC_UTILITY54, written
in C, which calculates the time intervals for each profile stage. The time values are
being recalculated each time as a step change of input signal occurs. A step of the
input signal is recognized with help of a differentiation block (DIF1 – approximation
of the derivative of the input by using a time constant).
The comparison logic at the right-hand circuit part is used for discontinuity
handling. It generates the discontinuity flag at the known time of the profile stage
changing. For more information on discontinuity handling in Simcenter Amesim
refer to its help page10.

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

Simcenter Amesim Control Add-On


Entry-ID: 109798524, V2.0, 01/2023 32
4 Detailed description of add-on components

Figure 4-21 Internal structure of CTRL_AO_SECORDER_PROFILE54

Ports, external variables, parameters


The component has 1 input:
1. “input signal, pu”: input step signal, whose first three derivatives must be
limited, in physical units.
The component has 4 outputs:
1. “output signal with limited first three derivatives, pu”: output signal with limited
first, second and third derivatives, in physical units.
2. “limited first derivative of signal” – first derivative of output signal, in physical
units per second.
3. “limited second derivative of signal” – second derivative of output signal, in
physical units per second squared.
4. “limited third derivative of signal” – second derivative of output signal, in
© Siemens AG 2023 All rights reserved

physical units per second cubed.

Figure 4-22 Ports and external variables of third-order profile generator

Table 4-8 Parameters of third-order profile generator


Title, units Name Parameter type
dynamical limits mode q_TPos_mode_sc Integer
setpoint processing mode abs_rel_task_mode_sc Integer
limit of first derivative, pu/s q1_sc Real
limit of second derivative, pu/s**2 q2_sc Real

Simcenter Amesim Control Add-On


Entry-ID: 109798524, V2.0, 01/2023 33
4 Detailed description of add-on components

Title, units Name Parameter type


limit of third derivative, pu/s**3 q3_sc Real
desired profile duration, s TPos_desired_sc Real
expected minimum amplitude of hMinStepAmplitude_sc Real
step change for input signal, pu
expected minimum duration of TMin_sc Real
constant signal part between step
changes, s
time epsilon on stage durations, s timeEps_sc Real

Dynamical limits mode


This parameter allows to select the approach for definition of dynamical limits.
There are two possible values:
• “0” – dynamical limits are defined directly using parameters “q1_sc”, “q2_sc”
and “q3_sc”.
• “1” – dynamical limits are defined indirectly using parameters
“TPos_desired_sc”, “q1_sc”, “q2_sc” and “q3_sc” as shown in equations
(4.16)-(4.18).

Setpoint processing mode


© Siemens AG 2023 All rights reserved

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).

Limit of first derivative


Absolute value for first derivative limit, value must be non-negative.
Example: If the input is distance in m, the limit of the first derivative is the maximal
velocity in m/s.
This parameter is directly applied for 𝑞1 if “dynamical limits mode” == “0”, and is
indirectly considered as shown in equations (4.16)-(4.18) if “dynamical limits mode”
== “1”.

Limit of second derivative


Absolute value for second derivative limit, value must be non-negative.
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.16) – (4.18) if “dynamical limits
mode” == “1”.

Limit of third derivative


Absolute value for third derivative limit, value must be non-negative.
Example: If the input is distance in m, the limit of the third derivative is the maximal
jerk in m/s3.
This parameter is directly applied for 𝑞𝑒 if “dynamical limits mode” == “0”, and is
indirectly considered as shown in equations (4.16)-(4.18) if “dynamical limits mode”
== “1”.

Simcenter Amesim Control Add-On


Entry-ID: 109798524, V2.0, 01/2023 34
4 Detailed description of add-on components

Desired profile duration


This parameter defines the desired duration of the generated profile with limited
first two derivatives.
This parameter has an effect only if “dynamical limits mode” == “1” as shown in
equations (4.16)-(4.18).

Expected minimum amplitude of step change for input signal


This value multiplied with 0.8 defines the minimal change of the input signal
amplitude, which is considered as a new setpoint step. If the signal amplitude
change is greater than this value, the calculation of new time-optimal profile will be
started.

Expected minimum duration of constant signal part between step changes


This value defines the time constant of the differentiation block, which recognizes
the step change of the input signal. If it is set too large, the input signal change
may be not recognized.

Time epsilon on stage durations


This value defines the minimal duration of a profile stage (e.g., a stage with
constant positive second derivative) which will be regarded as non-zero. All stages
smaller than this value will be ignored.
© Siemens AG 2023 All rights reserved

Simcenter Amesim Control Add-On


Entry-ID: 109798524, V2.0, 01/2023 35
5 Using links from Amesim help browser

5 Using links from Amesim help browser


To open one of the links listed in this manual, paste the link to the address field of
the Amesim help browser. If the address field is not shown, you can make it visible
with “View → Toolbars → Address Toolbar”.

Figure 5-1 Opening the help browser and accessing the address toolbar
© Siemens AG 2023 All rights reserved

Simcenter Amesim Control Add-On


Entry-ID: 109798524, V2.0, 01/2023 36
6 Appendix

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

SITRAIN – Digital Industry Academy


We support you with our globally available training courses for industry with
practical experience, innovative learning methods and a concept that’s tailored to
the customer’s specific needs.
For more information on our offered trainings and courses, as well as their
locations and dates, refer to our web page:
siemens.com/sitrain

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

Industry Online Support app


You will receive optimum support wherever you are with the "Siemens Industry
Online Support" app. The app is available for iOS and Android:
support.industry.siemens.com/cs/ww/en/sc/2067

Simcenter Amesim Control Add-On


Entry-ID: 109798524, V2.0, 01/2023 37
6 Appendix

6.2 Industry Mall

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

6.3 Application support


Siemens AG
Digital Factory Division
Factory Automation
Production Machines
DF FA PMA APC
Frauenauracher Str. 80
© Siemens AG 2023 All rights reserved

91056 Erlangen, Germany


mailto: tech.team.motioncontrol@siemens.com

6.4 Links and literature


Table 6-1
No. Topic
\1\ Siemens Industry Online Support
https://support.industry.siemens.com
\2\ Link to this entry page of this application example
https://support.industry.siemens.com/cs/ww/en/view/109798524

6.5 Change documentation


Table 6-2
Version Date Modifications
V1.0 08/2021 First version as additional library “2D Converting Library" for
Simcenter Amesim 2020.2-2021.2
V2.0 11/2022 Most components from V1.0 were included in the standard
“2D Mechanical / 2D Converting” library since Simcenter
Amesim 2021.2. Additional components are released as “2D
Mechanical” and “Control” add-ons for Simcenter Amesim
2022.1

Simcenter Amesim Control Add-On


Entry-ID: 109798524, V2.0, 01/2023 38

You might also like