Amesim Hil

Embed Size (px)

Citation preview

  • 8/10/2019 Amesim Hil

    1/11

    1 copyright LMS International - 2007

    IMPLEMENTATION

    Rapid

    controlsprototyping

    FUNCTION TEST

    (PRE) CALIBRATIONCONTROLENGINE

    Model in the Loop

    Software in the Loop

    DESIGN VALIDATION

    FUNCTIONSPECIFICATION

    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

    At the Implementation stage Software-in-the-Loop

    At the Function Test stage

    Hardware-in-the-Loop

    At the (Pre) Calibration stage

    AMESim in the Controller validation process

  • 8/10/2019 Amesim Hil

    2/11

    From Off-line to HIL Simulation

    Complete System Simulation

    - Simplification Process

    - Low Fidelity Modeling

    Generated c Code: Software

    Block Diagram Model of the

    Control Algorithms

    Embedded Software on Hardware

    SIL

    Low Fidelity Plant Model

    HIL

    High Fidelity Plant Model

    MIL

  • 8/10/2019 Amesim Hil

    3/11

    3 copyright LMS International - 2007

    AMESim : Simulink Interface

    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

    AMESim

  • 8/10/2019 Amesim Hil

    4/11

    4 copyright LMS International - 2007

    High frequency model - Time scale: crank angle deg.

    Physical model for engine-out emissions (trends)

    Engine & exhaust Control development

    3D

    1D

    0D

    Scalability of Engine models in AMESim

    Map Engine - Time scale: 0.1 s

    Look-up tables for engine-out emissions

    Generation of the exhaust mass flow with species

    3D CFD Model - Time scale: turbulence

    Physical models for engine-out emissions

    Generation of data for 0D and 1D models

    Mean Value Engine Model - Time scale: engine cycle

    Look-up tables + physics for engine-out emissions

    Engine & exhaust Control development, real-time

    Component

    System

    Functional

    Detail Level

    4 copyright LMS International - 2010 - Internal Combustion Engine Solution

  • 8/10/2019 Amesim Hil

    5/11

    5 copyright LMS International - 2007

    RT Targets Supported by AMESim are:

    dSpace (1005, 1006)

    RT-LAB (Opal-RT) xPC target (MathWorks)

    LABCAR (ETAS)

    LabView RT

    ETAS

    ADI

    AND technologies

    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

  • 8/10/2019 Amesim Hil

    6/11

    6 copyright LMS International - 2007

    Work flow for RT simulation

  • 8/10/2019 Amesim Hil

    7/11

    7 copyright LMS International - 2007

    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.

    The same user can do detailed analysis

    and real time models.

    Imagine.Lab

    AMESim

    Real world to Real time solution

  • 8/10/2019 Amesim Hil

    8/11

    8 copyright LMS International - 2007

    Debugging an AMESim system

    LMS Imagine.Lab comes with some few utilities able to help the user to detect which part of a systemhas 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 ofabout 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 theexecutable source within any debugger.

  • 8/10/2019 Amesim Hil

    9/11

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

  • 8/10/2019 Amesim Hil

    10/11

    10 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 whichwill 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

  • 8/10/2019 Amesim Hil

    11/11

    11 copyright LMS International - 2007

    Debugging tools: Activity Index

    No viscous friction set

    Weak springsSpool clearance very small

    Low leakage and low viscous friction

    Extremely

    small

    Chamber.

    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.