• FMI technology in MATLAB • Import FMUs (ME/CS) in Simulink ...

21
FMI technology in MATLAB Import FMUs (ME/CS) in Simulink Import FMUs (ME/CS) in MATLAB scripts Graphical interface for model configuration FMU-ME export from Simulink models FMU HILS on dSPACE

Transcript of • FMI technology in MATLAB • Import FMUs (ME/CS) in Simulink ...

Page 1: • FMI technology in MATLAB • Import FMUs (ME/CS) in Simulink ...

• FMI technology in MATLAB

• Import FMUs (ME/CS) in Simulink

• Import FMUs (ME/CS) in MATLAB scripts

• Graphical interface for model configuration

• FMU-ME export from Simulink models

• FMU HILS on dSPACE

Page 2: • FMI technology in MATLAB • Import FMUs (ME/CS) in Simulink ...

2015-01-28 © Modelon 2

Page 3: • FMI technology in MATLAB • Import FMUs (ME/CS) in Simulink ...

DOE: SIMPLISTIC APPROACHES

• One-factor-at-a-time (OFAT)

• Full-factorial design (gridding)

2015-01-28 © Modelon 3

x1

x2

x1

x2

Page 4: • FMI technology in MATLAB • Import FMUs (ME/CS) in Simulink ...

DOE DESIGNS

2015-01-28 © Modelon 4

Common ad-hoc

approach

Space-filling algorithms

Good coverage, also in

higher dimensions 100 test points, two factors Scales poorly with nbr

of factors

Corner cases poorly

covered in higher

dimensions

Page 5: • FMI technology in MATLAB • Import FMUs (ME/CS) in Simulink ...

A DOE TOOL FOR DYNAMIC SYSTEMS: REQUIREMENTS

User input

• FMU model • DoE factors from model • Ranges and distributions of

factors • Type of DoE design • Response variables to analyze or

visualize

Tool tasks

• Construct test matrix • Set FMU parameters • Simulate at all points, find

steady-state • Find inputs to match specified

outputs • Catch and manage simulation

errors • Linearize system at test matrix

points • Provide support for visualizing

results • Construct meta-models for

analysis 2015-01-28 © Modelon 5

Page 6: • FMI technology in MATLAB • Import FMUs (ME/CS) in Simulink ...

DOE IN THE FMI TOOLBOX FOR MATLAB

2015-01-28 © Modelon 6

FMU

DoE

variable

spec

Test matrix

Run

experiments

Visualize

result

Excel /

Matlab

Modeling

tool

FMI Toolbox for

Matlab

from version 1.6

FMUDoESetup class

constructor input:

• FMU file name

• Excel file name

• [Excel sheet]

• [options]

methods:

• qmc

• mc

• fullfact

• custom

FMUDoEResult class

properties:

• generation_date

• model_data

• doe

• constants

• experiment_status

• steady_state

• linsys

• options

• comp_time

visualization methods:

• main_effects

• bode

• step

Page 7: • FMI technology in MATLAB • Import FMUs (ME/CS) in Simulink ...

DEMO2: MASS SPRING MODEL AND DOE WORK FLOW

Page 8: • FMI technology in MATLAB • Import FMUs (ME/CS) in Simulink ...

DEMO2: TEST MATRIX SETUP

2015-01-28 © Modelon 8

8

c

c

cd

k

fxfxk

fxkdt

dxk

dt

xdm

Page 9: • FMI technology in MATLAB • Import FMUs (ME/CS) in Simulink ...

DEMO2: DYNAMICS ANALYSIS

• Time domain analysis

Step

• Frequency domain analysis

bode

2015-01-28 © Modelon 9

Page 10: • FMI technology in MATLAB • Import FMUs (ME/CS) in Simulink ...

EXAMPLE 2: ENGINE COOLING SYSTEM

• Demo model from Modelon’s Liquid Cooling Library

• Design variables: Maximum pump speed

Radiator efficiency

Minimum air mass flow

• Requirements: Engine-out coolant temp < 100 degC

Handle heat load of 100 kW

Ambient temperature operating range [-20 degC, 45 degC]

2015-01-28 © Modelon 10

Page 11: • FMI technology in MATLAB • Import FMUs (ME/CS) in Simulink ...

2012-05-24 © Modelon Modelon Confidential 11

IN SHORT...

>> exp_setup = read_experiment_setup_excel(‘parameters.xlsx’);

>> result = fmu_doe_qmc(‘CoolingLoop.fmu’, exp_setup, 100);

>> main_effects_plot(result, result.steady_state.y(:,3), ’T_liquid_ae’);

>> batch_bode(result, 1, 3, 100);

Get from here... ... to here... ... and here...

...in 4 Matlab commands!

with plenty of options to

customize the analysis

Page 12: • FMI technology in MATLAB • Import FMUs (ME/CS) in Simulink ...

DEMO3: VEHICLE MODEL FMU IN SIMULINK

• A linear single-track vehicle

model into an FMU

• Simulate the vehicle model in

an open-loop experiment

2015-01-28 © Modelon 12

Page 13: • FMI technology in MATLAB • Import FMUs (ME/CS) in Simulink ...

DEMO3: VEHICLE MODEL FMU IN SIMULINK

• A linear single-track vehicle model into an FMU

• Simulate the vehicle model in an open-loop experiment

• User a simple driver model to drive the vehicle around the predefined path

2015-01-28 © Modelon 13

Page 14: • FMI technology in MATLAB • Import FMUs (ME/CS) in Simulink ...

EXAMPLE 3: FMI BASED TOOL CHAIN

• Set up by Volvo with Modelon support.

• FMIT and FMIT-Coder completes tool chain.

• Entire suite of validation and verification development stages is covered by FMI technology.

• Consistent use of FMI enables improved work flow efficiency and model quality of the model based design (MBD) process.

• Same appearance of simulation and measurements made it possible to bring MBD to the test and calibration engineer.

2012-05-24 © Modelon Modelon Confidential 14

https://modelica.org/events/modelica2014/proceedings/html/submissions/ECP1409612

77_DrenthTormanenJohanssonAnderssonAnderssonTorstenssonAkesson.pdf

Page 15: • FMI technology in MATLAB • Import FMUs (ME/CS) in Simulink ...

FMI: A BUSINESS MODEL INNOVATION

• FMI-compliant tools often allow liberally licensed export of models for distribution

in the organization

• Exported FMU’s most often don’t require a license from the model authoring tool

• Deployment from few simulation specialists to designers, domain specialists,

control engineers

• One FMU used by many engineers (control design)

• One FMU run on many cores (robust design)

2015-01-28 15

Page 16: • FMI technology in MATLAB • Import FMUs (ME/CS) in Simulink ...

MODEL DEPLOYMENT

• FMU deployed (native tool) to support multiple applications

Mechanical

Mechanical System

FMU

Control Systems Electrical Control

Thermal

Control

Page 17: • FMI technology in MATLAB • Import FMUs (ME/CS) in Simulink ...

FMI ADVANTAGE

• Same model – different applications

2013-09-02 © Modelon

Page 18: • FMI technology in MATLAB • Import FMUs (ME/CS) in Simulink ...

2013-06-11 © Modelon 18

ALL CONNECTED!

Page 19: • FMI technology in MATLAB • Import FMUs (ME/CS) in Simulink ...

FMI APPLICATION TREND

ITEA2 MODELISAR

……

Lawrence Berkeley National Laboratory, The Building Control Virtual Test Bed: Improving Building Design and Operations

Page 20: • FMI technology in MATLAB • Import FMUs (ME/CS) in Simulink ...

TOWARDS AN AFFORDABLE SYSTEM ENGINEERING

Affordable Model Based

System Engineering

FMI Add-in for

Excel

FMI Toolbox for

MATLAB

Modelica Libraries

Academy

Consulting

Service

JModelica/

Optimica

2015-01-28 © Modelon 20

• Affordable • Accessible • Analytical

System Engineering

Page 21: • FMI technology in MATLAB • Import FMUs (ME/CS) in Simulink ...

CONCLUSIONS

• FMI shows its powerfulness in practicing MBD

Batch simulation in Excel

Simulation with Excel locally and cloud service remotely

Analysis of parametric uncertainty in dynamical systems by DOE in Matlab

Doing open-loop, closed-loop simulation with Simulink

HIL application

Tool-chain integration

• MBD’s acceptance and rooting at industries needs both state-of–the art technology, and easy access to such technology

• FMIT, FMIE and other FMI products accelerate industries’ moving towards AFFORDABLE/ACCESSIBLE/ANALYTICAL Model Based System Engineering solutions.

2015-01-28 © Modelon 21