Simulation Methods

Choosing a Simulation Method

Adams Controls offers you three methods with which you can simulate your integrated model and controller:
Co-simulation/Discrete mode: Specifies that Adams solve the mechanical system equations and the control application solve the control system equations. Adams and the control application exchange inputs and outputs at predetermined time interval also known as the communication interval or co-simulation interval. The mode names of "co-simulation" and "discrete" are synonymous.
Function Evaluation/Continuous mode: Specifies that the control application solve both the mechanical and control system equations. The mode names of "function evaluation" and “continuous” are synonymous.
Control System Import : Specifies that Adams solve the combined mechanical system and control system equations by importing an External System Library (ESL) which is binary representation of a model generated by MATLAB/Real-Time Workshop or Easy5. The ESL is used by Adams Controls to automatically create a General State Equations (GSE) entity, along with other supporting entities. This process is also known as External Function Evaluation (XFE), External System Import (ESI), Importing General State Equations, or Dynamic System Import (DSI).
These methods allow you to use different methods to integrate your Adams and controls models (EASY5 or MATLAB). See the table below for an overview of suitable controller/simulation method options.
 
 
Simulation Method
Controller type:
Discrete mode:
Continuous mode:
C-code import:
Continuous
Yes
Yes
Yes
Continuous sampled controller
Yes
Yes
Yes
Controller with discrete and continuous states
Yes
Yes
Yes
Discrete controller with synchronous sampling rates
Yes
Yes
Yes
Discrete controller with asynchronous multi-sampling rates
No
Yes
Yes
Logic-based controller
No
Yes
No

Co-simulation

For most analyses, the discrete mode is generally the more efficient simulation method. It is faster and can handle complex models better than continuous mode. You should use continuous mode when equations solved in the control system would cause a large coupling effect on the Adams data. For example, you might prefer to use the continuous mode if your analysis requires a very small time step.
To preserve the proper dynamics for a mechanical system, discrete mode should sample the mechanical system at least five times greater than the highest frequency of interest. If the time step is too small to sample at five times the highest frequency, then you should use continuous mode.
 
Note:  
You can find the highest frequency of your mechanical system by performing a linear analysis with the Adams add-on module, Adams Linear.

Function Evaluation

In continuous (function evaluation) mode, the control system package solves the equations of motion for the combined controls and mechanical dynamics system. Adams formulates the equations of motion for the mechanical subsystem and provides information to the controls package as needed.
Typically Adams simulations involve solving a set of differential (equations of motion) and algebraic (constraint and applied force) equations, known as a DAE system. The Adams integrators are specially tuned for efficient solution of this type of problem. Using coordinate partitioning, Adams can also formulate the equations of motion based on a minimum independent set of system states. This results in a compact ordinary differential equation (ODE) formulation of the equations of motion. Typically this system of equations is more difficult to solve numerically than the DAE method described above.
The benefit of this ODE formulation is that the state values and time derivatives can be easily communicated to the controls package. Using this information, the controls package can form a combined ODE system describing the controls and mechanical states. This is the problem that the controls package then solves with its own integration techniques. When a new set of state values is found in the controls package, Adams is called to find the time derivatives of these states, based on the ODE formulation that Adams has created for the mechanical states. This is why it is known as “function evaluation” mode. Adams simply sets up the equations of motion and provides time derivative information for the states in this mode.
For more information on how continuous mode works, refer to http://simcompanion.hexagon.com/iKB8015801.

Control System Import

In this mode, you can import into Adams a binary representation of the control system (or any other model) built in Easy5 or MATLAB. To do this, you have to first export the Easy5 or Simulink model using Easy5 or Real-Time Workshop along with Adams Controls to generate code. Adams Controls then allows you to create, in an automated manner, a general state equation (GSE) element and supporting elements in your Adams model. After this is done, you can simulate your combined model in Adams.