From a modeling perspective, Adams/Mechatronics has following benefits:• A control system has to be setup and coupled to mechanical system only once • Control systems and control signals
Trang 1as external system library or simply ESL file in Adams/Mechtronics) using the control package and then
do all calculations with Adams
You will also be able to include control system parameters in a design study in Adams/Insight for simultaneous optimization of both control system and mechanical system Furthermore, you will be able
to switch the control code in the model by selecting ESL (external system library) property files which refer to different ESL files
You can, for instance, use Adams/Mechatronics together with Adams/Car to:
• Tune both control parameters and suspension/driveline parameters to optimize shunt-and-shuffle phenomena
• Investigate the influence of active damping control on the forces in the suspension components
Once you complete the analysis of your model, you can easily share your work with others You can also create different plots of the controller input/output signals and vehicle dynamic responses In addition, you can access other users' models without overwriting their data
Benefits of Adams/Mechatronics
Adams/Mechatronics enables you to work faster and smarter with control systems, facilitate
understanding the effects of design change in the controls systems and mechanical system on total system performance
Trang 2From a modeling perspective, Adams/Mechatronics has following benefits:
• A control system has to be setup and coupled to mechanical system only once
• Control systems and control signals are handled as components among others
• The model can easily be used by different users, including those who are not familiar with the control systems
• Automatic signal unit conversions
• Easy to connect transducer and actuator signals to the control systems
• Overview and modify the control system input and output specifications
Model and Data Reuse
A key benefit of using Adams/Mechatronics is that it shares data and simulation components of control system with Adams This means that complete system-level optimization becomes easier for complex problems such as shunt-and-shuffle, ABS impact on ride/judder, etc For instance, you can load the Adams/Car assembly containing a control system as any other assembly, without having to perform several manual tasks to run the coupled simulation
In addition, Adams/Mechatronics includes a Signal Manager for setting up the connection (transducer and actuator signals) between the mechanical system and the control systems The settings you choose
in the Signal Manager are automatically saved with the subsystems of the assembly, so that the next time the assembly is opened, no further settings are needed before submitting the simulation
1 Start Adams/Car or Adams/View as explained in respective documentation
2 From the Tools menu, select Plug-in Manager
3 Find Adams/Mechatronics in plug-in list, and then select one or both of the following options
• Load: loads Adams/Mechatronics in the current session
• Load at Startup: instructs Adams to load Adams/Mechatronics in all future Adams
sessions
4 Select OK
Trang 3Adams/Mechatronics will be loaded into Adams The Adams interface now includes Mechatronics menu
in last position
Please also note that the Mechatronics plug-in will load automatically if you open an assembly which refers to a subsystem which contains a control system related object
File Architecture in Adams/Mechatronics
In Adams/Car case, figure below shows the database table directories in the shared database of
Adams/Mechatronics
Note that:
• external_system_libraries.tbl contains property files related to external system files generated by
control software like Matlab/Simulink and Easy5
• disturbance_files.tbl contains property files containing control signal disturbance data in ASCII,
RPCIII or DAC format
In Adams/View case, as there is no database table, dynamic link file is stored in a user-specified target folder
Trang 6Basic Concepts in Adams/Mechatronics
Here the basic components and terms used in Adams/Mechatronics are briefly described
• Transducer Signal
• Actuator Signal
• Control System
• Control System Input
• Control System Output
• Mechanical System
• Signal Manager
• External System Library (ESL)While the picture below illustrates how the (transducer and actuator) signals from the mechanical systems are connected to the control systems via the control system inputs/outputs, we will try to describe each term
Trang 7Transducer Signal
Transducer signals are used to measure a certain signal from an arbitrary location of the mechanical system For example, it can measure the rotational velocity of a wheel or the instantaneous brake pressure The measured signal is sent to the control system via the control system input
Trang 8create a point torque actuatorin the template builder and in the function expression refer to the actuator signal
Control System
A Control System in the context of Adams/Mechatronics is an object which contains information about the type of controller, the number of input channels and output channels, etc
Control System Input
Control system inputs are created when you create a control system The number of inputs specified for the control system will determine the number of control system input objects that are auto-created Using the Signal Manager, you can hook up the appropriate transducer signal (or other control system output)
to the corresponding control system input Since the control system inputs are always automatically
created, you can only perform Modify operations on them.
Control System Output
Control system outputs are created when you create a control system The number of outputs specified for the control system will determine the number of control system output objects that are auto-created Using the Signal Manager, you can hook up the appropriate control system output to the corresponding actuator signal Since the control system outputs are always automatically created, you can only perform
Modify operations on them.
Mechanical System
In Adams/Mechatronics the mechanical system refers to the mechanical model excluding the control
systems Note that you can exploit Adams/Mechatronics components such as transducer/actuator signals without the need for a new version of the model (template in Adams/Car) since you can
activate/deactivate the control system See Activity in Adams/Mechatronicsfor more information
Signal Manager
The Signal Manager is a graphic interface in Adams/Mechatronics where you connect the mechanical system(s) to the control system(s), i.e., connect the transducer signals to the control system inputs and control system outputs to the corresponding actuator signals Note that you can also connect a control system output of one control system to input of another control system Typically, you need to use the Signal Manager only once for a complete model and then connections will be saved within the model The next time you open the model, the signal connections will be setup automatically
Note: it is important to pay attention to difference between following terms: the Actuator Signal
which is an Adams/Mechatronics component and Actuators which is an Adams/Car
component
Trang 9External System Library (ESL)
External system library (ESL) is a general term used for code generated by control packages like
Matlab/RTW (Real-Time Workshop) or Easy5 This code is saved in a file with dll (dynamic link library) extension on Windows or so (shared objects) extension on Unix operating system.
To provide an effective access to the ESL file, Adams/Mechatronics uses ESL property file, which in turn
points to a ESL file and contains other information such as control system parameters name and value This provides the possibilities to perform a design study in Adams/Insight
In Adams/Car, ESL property files are stored in external_system_libraries.tbl directory in the Adams/Car
database In Adams/View, they are stored in a user-specified folder
Trang 11Working with Components
What you can do in the Adams/Car Template Builder and in Adams/View is:
• Create, modify, rename and delete transducer signals and actuator signals
• Create, modify, rename and delete control systems
• Modify, rename, rearrange and delete the auto-generated control system inputs/outputs
Please note that there is no dialog box available to create a control system input/output object; however,
they can be modified by using Modify dialog box.
In contrast to Adams/Car Template Builder and Adams/View, you are only allowed to modify the components in the Adams/Car Standard Interface mode, i.e., modify different signals and the control systems
Transducer Signals
The following picture shows how to create a transducer signal which should measure a state in the mechanical system This menu is available in Adams/Car Template Builder and in Adams/View Note that in Adams/Car case, the transducer signal should be created in the template where the signal arises
Trang 12The menu choice above will display the following dialog box:
Among other inputs such as name and type (only valid for Adams/Car), you should enter a function
expression that is measuring a state of the mechanical system Note that you can alternatively consider
the function definition as a user routine subroutine For more help on this please refer to Create/Modify Transducer/Actuator or Control System Input/Output dialog box help
As for all type of signals in Adams/Mechatronics in addition to choosing the applicable unit type and unit string, you alos have the possibility to scale the function and apply a disturbance and/or delay The later
options are described more in detail here
Further, you also have the option to turn on/off the auto-created signal request and measure The request
and the measure can be expressed in model unit and, if the unit string differs from the model units, also
in the user specified signal unit In the following example, the signal can be easily plotted in the Adams/Postprocessor in model units "deg/second" (in this case "degrees" and "second" are angle and
Trang 13time model units, respectively) and also in "rpm" (in this case it is assumed that the function expression
is producing result in "rpm")
A transducer signal activity can be set in two different ways:
• Always: the transducer signal object is always active in your model
• Only if connected: the transducer object is inactive until it gets connected to a corresponding
control system input If it is not connected, it will stay inactive, and will not be visible to the solver (i.e not visible in the adm file)
To understand more about how to use the activity setting, please refer to Activity settings section More details about the dialog settings can be found in the dialog box help (F1- help)
Trang 14Last, by selecting the push button shown in following picture, you will get the option to select entities located in the model that should be activated/deactivated dependent on if the signal gets connected or not Please refer to Activity settings to learn about this feature.
In Adams/Car Standard Interface mode, the function expression cannot be edited as expected But other options like request/measure activity, scale factor, disturbance, delay and unit information can still be
modified These choices are then stored in the subsystem file
In Adams/View all dialog box options above are available except the possibility to create symmetric
signals Hence, all signals in Adams/View are of ‘single’ type
Trang 15Actuator Signals
The actuator signal is used to transfer the output from the control system to the mechanical system and
is created via the menu below In Adams/Car the signal should be created in the template where the signal
is used and referred to
The dialog box of creating a new actuator signal is similar to one for the transducer signal except for the
function expression which is deactivated The reason is that the actuator signal gets its value from a
control system output and hence the function expression is already defined and cannot therefore be changed
Trang 16The available activity settings for an actuator signal are:
• Always: the actuator signal object is always active in your model
• Only if connected: the actuator object is inactive until it gets connected to a corresponding
control system output If it is not connected, it will stay inactive, and will not be visible to the solver (i.e not visible in the adm file)
• Only if referred to: If another object is using the actuator signal in a function expression, the
actuator signal will be active A typical example is if you have a force using the actuator signal in its expression
The user has the option – as for the transducer signal – to select entities whose activities depends on if the actuator signal gets connected or not To understand more about how to use the activity setting together with the options to select activity dependent objects, please read Activity settings
Control Systems
To create a control system, please use the menu below
Trang 17Dialog box below will be displayed and more detailed information about each option menu and field can
be found in the Create/Modify Control System dialog box help
In this dialog box, you specify control system Name, Type (only in Adams/Car), System Type and Number
of Inputs/Outputs.
The System Types can be one of the three following types:
• Function Expression - use the function builder to create a controller based on Adams entities
• Co-simulation - run co-simulation between Adams and a controls package (Easy5 or
MATLAB/Simulink)
• External System Library (ESL) - use an external system library (i.e dynamic link library) that
has been exported from Easy5 or MATLAB/Real-Time Workshop An ESL Property File refers
to an ESL (also known as dynamic link library) file.
If the System type Function Expression is chosen, no property file or other additional input is needed,
see below The function expression of the controller is instead defined and saved in each control system output In Adams/Car the function expression for each control system output is defined in the Template Builder mode, however, you are able to modify the control signal output expression using Create/Modify Control System dialog box
Trang 18If the System type Co-simulation is chosen, then you need to select the Control Package software you
want to use and if Initial Static Analysis should be performed or not The selected co-simulation settings
will be used by default when exporting the plant using Adams/Mechatronics Export Plant for simulation /Setting up ESL dialog box
Co-If the System type External System Library is selected, then you need to select the External System
Library file and whether Static Hold should be on or off, which determines if Adams/Solver should keep
the initial value of the control signal constant during static analysis
By selecting the push button shown in following picture, you can open the Control Signal Editor dialog
box, where you enter Signal Name (port name), Unit type and Unit string and Scale factor for each input
Trang 19and output of the control system Typically that information is received from the supplier of the control system.
Control System Inputs
When you create a control system, you specify the number of control system inputs and thereby control system inputs are auto-created After creation, you can – as for all types of signals- modify the unit type, unit string, delay, disturbance, etc of control system inputs using Create/Modify Control System dialog box Using the Signal Manager, you can hook up the appropriate transducer signal to the corresponding Control System Input
Control System Outputs
When you create a control system, you also specify the number of control system outputs and thereby they are auto-created directly After creation, you can modify the unit type, unit string, delay, disturbance, etc of control system outputs using Create/Modify Control System dialog box Using the Signal Manager, you can hook up the appropriate Control System Output to the corresponding actuator signal
Trang 20Actator Signal: ues_csa_’signal name’ (csa = Control Signal Actuator)
Control System: ues_’system name’
Control System Input:ues_csi_’system name’_’input port name’ (csi = Control System Input) Control System Output:ues_csi_’system name’_’output port name’ (cso = Control System Output)
Here ‘ues’ stands for ‘user-defined entity single’ In Adams/Car it is possible to create symmetric signals
and control systems In that cases the prefixes for the symmetric (left/right) signals are uel_cst_’signal name’ and uer_cst_’signal name’ (for a transducer signal)
Signal Manager
The Signal Manager is the key feature of Adams/Mechatronics and is where all connections are set, i.e., the connection between the control systems and transducer/actuator signals of the mechanical system The following schematic illustrates the signal flow in Adams/Mechatronics
While an overview of Signal Manager is presented here, a more detailed description can be found in the Adams/Mechatronics Tutorials
To open Signal Manager, use the following menu Note that in Adams/Car this menu is only available in
Standard Interface Mode
Trang 21Select the assembly (Adams/Car) or model (Adams/View) in which the control system exists.
As an example from the information in the preceding dialog box, you can notice that there are two control systems in the assembly and they are located in the two subsystems with major roles 'control system' and the minor roles are 'ABS' and 'ESP'
Note that, alternatively, the control systems could have been created in the one single
template/subsystem In that case, both control systems would have the same major and minor roles
In Adams/View, as there is no major and minor role concept; the major/minor role columns are hided
By selecting a control system in the dialog box above (you select by double clicking on any cell in the row of the corresponding control system), a new dialog box pops up which gives an overview of the connectivity for each input and output port of the control system (following picture) The information in the gray area (input port name and unit type) is related to the control system itself - and therefore cannot
be changed here - while the white area is a 'selectable' area
You also get the information (from the major and minor role) that in which subsystem the connected signal is located The name convention of the signals also reveals the type of connected signal For
Trang 22instance input port number 8 with port name 'wheel_speed_fl' below is connected to a ('uel_cst') left side transducer signal named as 'wheel_speed_front'.
By selecting an input port row in the white area, you will have the possibility to choose a signal from the
Available Signal List in ‘Selecting input’ dialog box to connect to the certain input port Please note that
only the signals of the same unit type as the input port are displayed in the (available signal) list In the
example below, only the transducer signals and control system outputs of ‘angular velocity’ unit type are shown in the table as possible candidates to be connected to the ‘wheel_speed_fl’ input port
The output tab, as depicted in following picture, is quite similar to input tab except that here the gray area (information related to the control system; i.e., output port name and unit type) is located on the left side
Trang 23of the table (to resemble the signal flow) and also that more then one signal can be connected to the output port.
In the following lines, some background or implementation information is presented which may be of interest to advanced users
• Note that each signal connection is based on following Connector data
• Signal Name
• Side (left/right/single)
• Major Role
Trang 24• Minor Role
Once connections have been established, each individual connection is saved into a connector
data section of the signal component
• Connector info is only stored with control system inputs and actuator signals since these can only be connected to only one single signal in contrast with transducer signals and control system outputs which may be connected to more than one signal
• The use of major and minor role makes the connector info independent of assembly and subsystem name It is then possible to swap control systems or subsystems without need of redoing the connecting process in signal manager
• The connector concept is comparable with input communicator in standard Adams/Car One difference is though while you work with communicators in the template builder mode, here you setup the connections on the assembled model in the Standard Interface Mode
• In the Adams/View, only the connector signal name is used when making connections
Units in Adams/Mechatronics
Adams/Mechatronics supports arbitrary units in all signal types It also takes care of units conversion, for example, from a transducer signal to the corresponding input signal in the control system The units are
handled by two attributes in Adams/Mechatronics: unit type and unit string.
Unit type indicates which kind of unit you are using, for example, velocity or torque
Adams/Mechatronics only allows connection of the same unit types when assigning a transducer signal
to a control system input, a control system output to an actuator signal, or a control system output to input
of another control system
The unit string is used by Adams/Mechatronics to calculate the appropriate conversion factor For example, if you define the wheel speed transducer signal to send signal in mm/s unit and your control system input requires a km/h unit, the conversion is performed by Adams/Mechatronics This means that
a unit conversion occurs automatically if the units are not the same, for example, for a transducer signal and the corresponding control system input
Trang 25There is a set of pre-defined unit types and unit strings available in Adams/Mechatronics However, if your control system is working with other type of unit, you can create your own unit See the table below for more information about how to choose different unit type and unit string alternatives.
length, angle, model units The transducer/actuator/control
signal is (or should be) dependent
to be independent of model units
Example: user subroutine without units handling or generated control code
Always conversion
length, angle, user defined You need a unit which is not
available in the pre-defined unit string list
Unit string can be composed using the Adams/View convention (see here for more info) Make sure to use the appropriate unit strings for the unit type selected
Trang 26Disturbance and Delay
In Adams/Mechatronics ‘Disturbance’ and ‘Delay’ can be applied to all four types of control signals
user user defined Desired unit type is not available in
select list but unit string can be composed using the Adams/View convention (see here for more info)
Make sure the same unit types are used in "both ends", e.g in both transducer and control system inputuser no_units Desired unit type is not available in
the pre-defined unit type list and unit string can't be composed using Adams convention (see here for more info)
No units conversion will be done if you use no_units in
"both ends", e.g in both transducer and control system input You can use scale_factor to enforce a unit conversion effect
Trang 27Disturbance can be introduced to signals by adding or multiplying as illustrated below
The Disturbance Signal can have one of four following formats
• Run-Time Expression – Enter a constant or an arbitrary function expression
• ACII File – The disturbance signal is defined in a certain Disturbance ASCII File, see file
example below You need to specify the channel to use
• RPC File - The disturbance signal is defined in a RPCII file You need to specify the channel
number to use
• DAC File- The disturbance signal is defined in a DAC file
A simple example of a Disturbance ASCII File is shown below:
Trang 28body_acc = 'meter/sec**2'wheel_speed_fl = 'rad/sec'wheel_speed_fr = 'rad/sec'
$ -SCALE_FACTORS[SCALE_FACTORS]
body_acc = '9.82'
$ -CHANNEL_DATA[CHANNEL_DATA]
{ TIME engine_rpm body_acc wheel_speed_fl wheel_speed_fr }0.0 0.0 0.0 0.0 0.0
1.0 1.0 1.0 1.0 1.02.0 2.0 2.0 2.0 2.03.0 3.0 3.0 3.0 3.04.0 4.0 4.0 4.0 4.0
Delay
Delay functionality accounts for delayed signal and makes it possible to set a constant time delay or a user defined time delay expression applied before or after the disturbance
The following diagram shows the data flow for a control signal As can be seen, the delay can be placed
in three different “positions” with respect to signal function and disturbance In addition to delay position, you need to specify the delay time function (whose value must be positive or zero), and delay initial
Trang 29history, that is, the initial value of delay function Please refer to dialog box help (F1- help) for different settings.
Whether a disturbance/delay is applied or not and where the delay function is applied affect the solver variable function and request expressions in the control signal UDE For each configuration a picture depicts the data flow, in which the request component signal “positions” are marked in blue color There exist a total of six disturbance and delay configurations cases as shown enumerated in the following table
choice
Case 4 Yes Yes (set to “function”) Position 1 in picture above
Case 5 Yes Yes (set to “disturbance”) Position 2 in picture above
Case 6 Yes Yes (set to “disturbed function”) Position 3 in picture above
Trang 30• Case 1: No disturbance or delay is applied
• Case 2: No Disturbance is applied, Delay is applied (set to function)
Trang 31• Case 3 Disturbance is applied, no Delay is applied
• Case 4: Both Disturbance and Delay is applied, Delay is set to “function”
Trang 32• Case 5: Both Disturbance and Delay is applied, Delay is set to “disturbance”
• Case 6: Both Disturbance and Delay is applied, Delay set to “disturbed_function”
Export Plant
Plant export is used to create a control package input file (an inf file for Easy5 or a m file for MATLAB/Simulink) which is needed to set up either a co-simulation or ESL (external system library) simulation
Trang 33Use the following menu to access the export plant dialog box in Adams/Mechatronics.
The following dialog box will pop up:
Note that by performing a plant export, an adm file will also be generated; however, the adm file only will be used in case of co-simulation, i.e., the ESL simulation does not need the adm file Also note that the content of the adm file differs depending on which type of control system (ESL or Co-Simulation) is used, therefore it is important that not to use the adm file generated for ESL control system for a co-
simulation analysis
There are some differences in how to use the plant export in Adams/Car and Adams/View as well as the purposes of export, i.e., co-simulation or ESL simulation
Trang 34In Adams/Car:
• For Setting Up ESL Simulation, display (by yourself) the plant export dialog box via menu as
shown above and then select the control system name and a file prefix for the exported file You can export the plant both in Template Builder and in Standard Interface mode The following dialog box appears after plant export
• For Co-Simulation, please follow the instruction shown in the preceding information dialog
box or refer to the Running Analysis section Note that in Adams/Car co-simulation, you need to generate an adm file by performing a "file only" simulation so that enforce Adams/Car to read the property files and set up the model parameters property Here the plant export dialog box show up automatically
In Adams/View:
• For both ESL simulation setup and Co-Simulation: Display (by yourself) the plant export
dialog box Select the control system, a file prefix, and other proper settings
If the control system is not of the co-simulation type, then the following message will appear to inform that you use the generated files only for settings up external system libraries in chosen control package software
Trang 35If the control system is of the co-simulation type, then the system name field automatically fills with the names of the control systems that are of type ‘Co-Simulation’ (The ones which exist in the default model) If the control system type is set to ‘Co-Simulation’, the generated files could
be used for the both purposes
External System Library (ESL) Property file
In Adams/Mechatronics, a property file called External System Libraries (ESL) property file is used to incorporate the external system library (aka dynamic link library) files generated by control package software (Easy5 and Matlab/Real-time Workshop)
An ESL property file is a text file with file extension of esl and consists of the following sections.
• Routine - reference to the external system library file name (without file extension) and the
routine within that library file (generally an ESL file may contain several routines)
• Parameters - external (tunable) parameters specified in the controls package
• Initial conditions – initial conditions of continuous and discrete states of the control system
included in the library file
The use of property files enables you not only to easily switch between different external system libraries (i.e imported control systems) but also to evaluate different parameter settings for a certain dynamic link library file For example in the following picture five different property files are referring to the same dynamic link library file In this case, the routine information in these files is the same but the values for
Trang 36the external tunable parameters differ Examples of tunable parameters is a certain gain settings or threshold values for an ABS controller.
To generate an ESL property file in Adams/Mechatronics, use the following menu
The following dialog box appears where you choose the Control Package software that the dynamic link library (External System Library) originates from and the Property File Name of the file that is going to
be generated
While in Adams/Car, the files will be stored in the directory called 'external_system_libraries.tbl' in the default writable database, in the Adams/View you select a target directory where the property file will be
Trang 37copied to In both Adams/Car and Adams/View cases, the dynamic link library file will be copied into a sub directory named after the platform (win32, win64, linux32, linux64, etc) This is to support a
platform independent use of the property files For instance in the preceding example and on a win32 platform, the ESL property file and the ESL file will be copied into following locations:
C:/Temp/external_system_libraries/abs_system_version1.esl
C:/Temp/external_system_libraries/win32/abs_controller.dll
In case of HPUX platform, the full path to the copied library file would be:
C:/Temp/external_system_libraries/hpux/abs_controller.sl
Other platform follows the same principle
Finally, if the control system type is set to ‘External System Library’, followings steps are internally
performed by Adams (This is performed prior to an analysis - during reading property file procedure - in Adams/Car and after a modify action of the system in Adams/View):
1 Locates the ESL file referenced in the ESL property file The path to the library file is
“path to ESL property file”/ “platform”/ “library file name”.(dll, so, sl )
2 Verifies that the dimension of the control system found in the ESL property file corresponds to the one defined in Adams/Mechatronics, i.e., matches the number of inputs and outputs
3 Activates the General State Equation (GSE) in the control system component and set the
dimension of the different solver arrays related to the GSE
4 Reads the default parameter values and initial conditions defined in the ESL file
5 Overrides the values of the parameters and initial conditions with the ones specified in the ESL
To allow using the same mechanical template regardless of whether it will be used in an assembly with control systems or without control systems, the concept of Activity Type is introduced for
transducer/actuator signals By using different Activity Types in conjunction with selected strategies for implementing the actuators influencing the mechanical behavior, you can make the mechanical templates compatible with both user scenarios
When you create a transducer/actuator signal, you can select the signal activity type In the table below,
a summary of the different activity options and the corresponding consequences is shown
Trang 38When setting up your templates to be used both with and without control systems, there are two "levels"
of activities One level deals with setting up the activity of the transducer/actuator signal itself that is named Activity Type and determines whether the signal should be written into adm file or not The other level is signal connectivity status which deals with whether the signal is connected to the control system, actuators, or components of the mechanical system You can also define activity of a group of Adams objects to be dependent on the signals’ connectivity Table below shows different alternatives for signal activity and signal connectivity The table columns are explained thereafter
3 Only if referred to: the actuator signal will be active only if another object in the model is referring
to it As an example, consider the use of a conventional mechanical damper object You could replace that damper with a controlled one, and then automatically have the associated actuator
signals become active, since they are referred to by that controlled damper object
Note that the later (“Only if referred to”) option is only applicable to actuator signal (i.e., not applicable
Trang 39This indicated whether the transducer/actuator signal has been connected or not to a control system input/output In each transducer and actuator signal object there is a variable which keeps track of whether the transducer or actuator signal has been connected to the control system input/output The
name of this variable is signal_connectivity_flag; and its value is 1 if the connection is successful and 0
if there is no connection made You can also use this variable in function expressions in the mechanical template to build in logic supporting the use of the template both with and without control systems
Referred to
For each type of activity and connection status, the actuator signal may or may not be used in an
expression of some other (mechanical) object, i.e referred to If it is referred to by another object, then the transducer/actuator signal object will be active in the model
Signal Activity State
This indicates the activity of the transducer/actuator signal itself and determines whether the signal is written into adm file or not
Active Object State
This indicates the activity state of those objects which have been selected (if any) to be in the "Active Objects" group when you created the transducer or actuator signal This allows you to use the
connectivity of the transducer/actuator signal as a trigger to set activity of arbitrary other objects in your subsystem For example, you could have two actuators acting on a brake disk and have one dependent on the control signal passed through the actuator signal and the other dependent on the open-loop driver demand You could thus let only one be active at the time, dependent on the connectivity of the actuator signal
“Intelligent” modeling
When selecting the type of signal activity, you should have a strategy in mind in terms of how to use the transducer/actuator signal in the mechanical system Let us consider a brake torque as an example
Normally, the brake torque actuator force expression would be a function of the brake_demand signal
from the driver model If you want to let the ABS system control the brake torque, you would instead make the brake torque actuator function be dependent on an actuator signal However, if you want to be able to use the same brake subsystem in both assemblies with and without the control system subsystems, you have a couple of alternatives as follows to make the brake torque "intelligent" enough:
Alternative 1, use signal_connectivity_flag
In this case, the function expression for the brake torque actuator would look something like
FUNCTION = (1-signal_connectivity_flag) * F(brake_demand) + signal_connectivity_flag *
F(actuator_signal)
Trang 40In this alternative, suitable activity settings for the actuator signal object would be 'Always' or 'Only If Referred To'.
Alternative 2, use Active/Inactive Objects
Instead of, as in the previous example, writing a complex function expression for one torque actuator
object, you can create two torque actuators Then you let one actuator be dependent on the brake_demand
variable, and the other actuator be dependent on the actuator signal object When you create the actuator_signal, you simply select the ‘arrow button’ to display a dialog box where you can put the proper actuator objects in the Active Object group and Deactive Object group In this way, Adams/Mechatronics will automatically switch the activity of the two torque actuators if the actuator signal is connected to (or disconnected from) the control system In other words, you should in this case use the 'Always' or 'Only
If Connected' activity setting when you create the actuator signal
Alternative 3, use UDE replace
If you are working with UDE components, there is a third alternative For example, if you replace a conventional damper with an active damper, you want the actuator signal from the control system to automatically connect to the damper force object An example of an active damper has been included in
the Mechatronics installation as the amech damper If your UDE is already created and implemented in
Adams/Mechatronics continue at step 2
1 Create the UDE with the necessary elements and dependencies The UDE is created as any other UDE with a few alterations described here The actuator has to be created in the UDE as a data element variable
data_element create variable &
variable_name=.tmp_damper.actuator_signal &
function="0"
The actuator variable is then implemented in the UDE as intended, for example in a force expression
Note: If you would use 'Only If Connected', you would get an error message in the Solver in case
the actuator signal is not connected, i.e if you try to use this brake system with no control subsystem in the assembly This is because the signal_connectivity_flag will be
deactivated and thus no longer visible in the adm file, and thus the function expression refers to a non-existing object
Note: In this case, the only difference between the use of 'Always' and 'Only If Connected' will
appear when the actuator signal is not connected What happens with 'Always' then is that the actuator signal will stay active, producing only zero output whereas with 'Only If
Connected', the actuator signal will be deactivated, thus not being visible to the Solver