Вы находитесь на странице: 1из 11

AMESim in the Controller validation process

VALIDATION

DESIGN
ENGIN
E

(PRE) CALIBRATION

CONTROL

Rapid
controls
prototyping
FUNCTION
SPECIFICATION

FUNCTION TEST

Model in the Loop

Hardware in the Loop

AMESim and its realtime


solution is used all over the
design cycle in various
subsystems
 At the Function Specification stage
Model-in-the-Loop

Software in the Loop


IMPLEMENTATION

 At the Implementation stage


 Software-in-the-Loop
 At the Function Test stage
Hardware-in-the-Loop
 At the (Pre) Calibration stage

1 copyright LMS International - 2007

From Off-line to HIL Simulation


Complete System Simulation
Block Diagram Model of the
Control Algorithms

MIL
High Fidelity Plant Model

Generated c Code: Software

Embedded Software on Hardware

SIL

- Simplification Process
- Low Fidelity Modeling

HIL
Low Fidelity Plant Model

AMESim : Simulink Interface

AMESim

 Plant models are built in AMESim due to the collection of physical libraries and its fidelity
 AMESim model can be exported into Simulink as a s-function and solved using
 Co-Simulation (each software uses its own solver)
 S-function (purely Simulink solver)
 In both these cases, an AMESim runtime license is required
 Simulink model can be exported into AMESim (through RTW)
 AMESim models can be exported into Simulink using the Blackbox export. End users do
not require any AMESim runtime licenses
3 copyright LMS International - 2007

Scalability of Engine models in AMESim


Detail Level
Map Engine - Time scale: 0.1 s
Look-up tables for engine-out emissions
Generation of the exhaust mass flow with species

Functional
0D

Mean Value Engine Model - Time scale: engine cycle


Look-up tables + physics for engine-out emissions
Engine & exhaust Control development, real-time
System
High frequency model - Time scale: crank angle deg.
Physical model for engine-out emissions (trends)
Engine & exhaust Control development

3D CFD Model - Time scale: turbulence


Physical models for engine-out emissions
Generation of data for 0D and 1D models
4 copyright LMS International - 2010
2007 - Internal Combustion Engine Solution

1D

Component
3D

AMESim in the Realtime segment


AMESim libraries are real-time compliant
Users can develop AMESim plant models and can test it first hand if they can
be solved using fixed step solvers
Users can directly generate the source codes for various real-time targets
RT Targets Supported by AMESim are:
 dSpace (1005, 1006)
 RT-LAB (Opal-RT)
 xPC target (MathWorks)
 LABCAR (ETAS)
 LabView RT
 ETAS
 ADI
 AND technologies

5 copyright LMS International - 2007

Work flow for RT simulation

6 copyright LMS International - 2007

Real world to Real time solution


CHALLENGE: Model
simplification requires
an clear understanding
of the parts of the
system that causes the
model to slow down

Activity Index, Eigen Values, Modal


Shapes and State Count facilities
are used together to simplify the
complex model.
Imagine.Lab
AMESim

7 copyright LMS International - 2007

The same user can do detailed analysis


and real time models.

Debugging an AMESim system

 LMS Imagine.Lab comes with some few utilities able to help the user to detect which part of a system
has been badly modeled or what went wrong during the simulation.

 How a modeling error is identified in an AMESim system?




It will generally lead to


A code generation problem (very rare)
(sol: pop-up message indicating connection/code generation error)
An integration failure (when Nans or Infs are generated)
(sol: state count facility)
An integration slow down (most of the time)
(sol: state count + LA + activity index)
Spurious discontinuities produced
(sol: discontinuities printout & guilty submodel investigation)

 Each modeling problem can hence be detected / analysed with some numerical tools at the cost of

about an 1hr analysis (depending on the size/complexity of the system and the user knowledge).
 Moreover LMS Imagine.Lab allows to compute a system in debug mode, giving access to main the
executable source within any debugger.

8 copyright LMS International - 2007

Debugging tools: State Count facility

This facility prints a counter for each


state variable which is incremented each
time a given variable is the most difficult
to integrate at last converged step.
Double clicking on the concerned
variable allows the user to get the
submodel where this state is computed.

State count facility will allow the user to monitor dynamically which variable slows
down the simulation at a given time. When the integration is slowed down, you will
be able to plot the variable counters dynamically and detect which part of the
system gives problems to the integrator.

9 copyright LMS International - 2007

Debugging tools: Linear analysis (LA)


LMS Imagine.Lab comes with LA facilities that allows the user to compute
eigenvalues and natural frequencies present in the system
Selecting the state variables as observer variables in the AMESim model will let
you determine which part of the system is sensitive to a given frequency and which
will be excited by this frequency (Mode shapes)
Complex eigen values with high natural frequencies always contribute to slow
simulations so special care must be provided to their origins

10 copyright LMS International - 2007

Debugging tools: Activity Index


Activity index analysis calculates the percentage of energy that flows through the C, R and I elements over
the total energy in the system.
This normalized value determines which component plays an active role in a model simulation.
It shows the energy-active and energy passive elements in the system thereby allows us to replace the
active ones by a simpler model
Activity index is also a good tool to detect bad input data.

No viscous friction set

Weak springs

Spool clearance very small


Low leakage and low viscous friction

Extremely
small
11 copyright LMS International - 2007

Chamber.

Вам также может понравиться