digital transformation#1: matlab e simulink per supportare ......5 digital transformation: learnings...

52
1 © 2020 The MathWorks, Inc. Digital Transformation#1: MATLAB e Simulink per supportare Modellazione & Simulazione dei sistemi in Industry 4.0 Aldo Caraceto Application Engineering Group

Upload: others

Post on 25-Jul-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Digital Transformation#1: MATLAB e Simulink per supportare ......5 Digital Transformation: Learnings from studies and programs Customers want increasingly individualized products

1© 2020 The MathWorks, Inc.

Digital Transformation#1:

MATLAB e Simulink per supportare

Modellazione & Simulazione dei sistemi in Industry 4.0

Aldo Caraceto

Application Engineering Group

Page 2: Digital Transformation#1: MATLAB e Simulink per supportare ......5 Digital Transformation: Learnings from studies and programs Customers want increasingly individualized products

2

Modellazione & Simulazione dei sistemi in Industry 4.0 - Agenda

Orario Titolo della Sessione

09:00 Digital Transformation Industriale: opportunità, sfide e soluzioni per lo sviluppo prodotto

09:10 MATLAB & Simulink per Modellazione & Simulazione di sistemi virtuali in Industry 4.0

09:20 Esempi di sviluppo di sistemi di controllo per apparati meccatronici

• Modellazione di plant a partire da equazioni/multifisici

• Progettazione di controlli continui e a logiche ad eventi discreti

10:05 Q&A

Page 3: Digital Transformation#1: MATLAB e Simulink per supportare ......5 Digital Transformation: Learnings from studies and programs Customers want increasingly individualized products

4

Digital Transformation Industriale: opportunità, sfide e

soluzioni per lo sviluppo prodotto

Page 4: Digital Transformation#1: MATLAB e Simulink per supportare ......5 Digital Transformation: Learnings from studies and programs Customers want increasingly individualized products

5

Digital Transformation: Learnings from studies and programs

▪ Customers want increasingly individualized products. “sample-size 1”

▪ Autonomous machines which do not require costly programming to meet

new requirements. “Smart products”

▪ Intelligent products that collect data to optimize processes and develop new products

▪ Competitive threats from big players offering internet-related and IT products and

services.

▪ Opportunities for innovative business models and services. Particularly for SME’s.

“Servitization”

Page 5: Digital Transformation#1: MATLAB e Simulink per supportare ......5 Digital Transformation: Learnings from studies and programs Customers want increasingly individualized products

6

Digital Transformation of the Industry: is everywhere

– Higher flexibility given by small batches production

with the economies of scale

– Higher speed from prototyping to mass production

using innovative technologies

– Increased productivity thanks to lower set-up time

and reduced downtimes

– Improved quality and scrap reduction thanks to

real time production monitoring through sensors

– Higher competitiveness of products thanks to

additional functionalities enabled by Internet Of

Things

Page 6: Digital Transformation#1: MATLAB e Simulink per supportare ......5 Digital Transformation: Learnings from studies and programs Customers want increasingly individualized products

7

The birth of New Challenges designing multi-domain, smart, connected

systems

▪ Too slow because process is serial and fragmented, many iterations are needed

▪ Components over- under dimensioned

▪ System Performance issues detected too late in integration phase

▪ Need risky/expensive physical machine testing

▪ Tuning and commissioning is lengthy

▪ Need to design more intelligent and connected systems

▪ Need customizable systems without extensive re-design and programming

Page 7: Digital Transformation#1: MATLAB e Simulink per supportare ......5 Digital Transformation: Learnings from studies and programs Customers want increasingly individualized products

8

The birth of New Challenges designing multi-domain, smart, connected

systems

▪ Too slow because process is serial and fragmented, many iterations are needed

▪ Components over- under dimensioned

▪ System Performance issues detected too late in integration phase

▪ Need risky/expensive physical machine testing

▪ Tuning and commissioning is lengthy

▪ Need to design more intelligent and connected systems

▪ Need customizable systems without extensive re-design and programming

Page 8: Digital Transformation#1: MATLAB e Simulink per supportare ......5 Digital Transformation: Learnings from studies and programs Customers want increasingly individualized products

9

Approaches and Enablers

to address these Challenges

Page 9: Digital Transformation#1: MATLAB e Simulink per supportare ......5 Digital Transformation: Learnings from studies and programs Customers want increasingly individualized products

10

Key Enabler: Mechatronics

Combination of mechanical-, computer-,

telecommunications-, systems- and control

engineering with electronics

Page 10: Digital Transformation#1: MATLAB e Simulink per supportare ......5 Digital Transformation: Learnings from studies and programs Customers want increasingly individualized products

11

Key Enabler: Cyber Physical System

▪ A mechanism controlled by

computer-based algorithms,

tightly integrated with the Internet

▪ Process control based on

embedded systems

▪ Examples: smart grid, autonomous

automobile, medical monitoring, robotics

Page 11: Digital Transformation#1: MATLAB e Simulink per supportare ......5 Digital Transformation: Learnings from studies and programs Customers want increasingly individualized products

12

Key Enabler: Digital Twin

▪ A digital replica of physical assets,

that can be used for various purposes.

▪ Integrate machine learning and analytics

to create living digital simulation models

that continuously learn and update

themselves

Page 12: Digital Transformation#1: MATLAB e Simulink per supportare ......5 Digital Transformation: Learnings from studies and programs Customers want increasingly individualized products

13

MATLAB e Simulink per

Modellazione & Simulazione di sistemi virtuali

in Industry 4.0

Page 13: Digital Transformation#1: MATLAB e Simulink per supportare ......5 Digital Transformation: Learnings from studies and programs Customers want increasingly individualized products

14

Modellazione e Simulazione in Industry 4.0

▪ «Rapid Experimentation and

Simulation»

è una leva fondamentale per

ridurre Time-to-Market

▪ La simulazione è solo un

elemento; altri devono essere

resi disponibili per il massimo

risultato possibile.

▪ Molteplici driver determinano il

successo di un progetto: es.

«Time-to-Market», senza

«Quality»?

“Industry 4.0. How to navigate digitalization of the manufacturing sector” – McKinsey Digital, 2016

Industry 4.0 Levers

Value Drivers

Page 14: Digital Transformation#1: MATLAB e Simulink per supportare ......5 Digital Transformation: Learnings from studies and programs Customers want increasingly individualized products

15

Modellazione e Simulazione in Industry 4.0

Page 15: Digital Transformation#1: MATLAB e Simulink per supportare ......5 Digital Transformation: Learnings from studies and programs Customers want increasingly individualized products

16

Modellazione e Simulazione in Industry 4.0

“Product Life Cycle Risk Management”, Jan Machac, Frantisek Steiner and Jiri Tupa, 2017

Page 16: Digital Transformation#1: MATLAB e Simulink per supportare ......5 Digital Transformation: Learnings from studies and programs Customers want increasingly individualized products

17

Model-Based Design

INTEGRATION / COMMISSIONING

IMPLEMENTATION

PLCMCU DSP FPGA ASIC

IEC HDLC, C++

DESIGN

Environment Models

Physical Plant Models

Control / Supervisory Logic Models

TE

ST

& V

ER

IFIC

AT

ION

RESEARCH REQUIREMENTSWhat if you were able to verify your system’s

behavior through the entire design process?

Page 17: Digital Transformation#1: MATLAB e Simulink per supportare ......5 Digital Transformation: Learnings from studies and programs Customers want increasingly individualized products

18

Model-Based Design

INTEGRATION / COMMISSIONING

IMPLEMENTATION

PLCMCU DSP FPGA ASIC

IEC HDLC, C++

Step 1: Desktop Simulation

▪ Prototype new functionality and

combine with existing code

▪ Perform automated system tests

that would not be feasible outside of

simulation

▪ Optimize parameters (software,

mechanics, hydraulics, etc.)

DESIGN

Environment Models

Physical Plant Models

Control / Supervisory Logic Models

RESEARCH REQUIREMENTS

TE

ST

& V

ER

IFIC

AT

ION

Page 18: Digital Transformation#1: MATLAB e Simulink per supportare ......5 Digital Transformation: Learnings from studies and programs Customers want increasingly individualized products

19

Model-Based Design

Step 2: Hardware in the Loop

▪ Emulate the behavior of the physical

system in real-time

▪ Connect the virtual plant to your

PLC or industrial PC

INTEGRATION / COMMISSIONING

TE

ST

& V

ER

IFIC

AT

ION

IMPLEMENTATION

PLCMCU DSP FPGA ASIC

IEC HDLC, C++

DESIGN

Environment Models

Physical Plant Models

Control / Supervisory Logic Models

RESEARCH REQUIREMENTS

Page 19: Digital Transformation#1: MATLAB e Simulink per supportare ......5 Digital Transformation: Learnings from studies and programs Customers want increasingly individualized products

20

Model-Based Design

Step 3: Production Use

▪ Design and test hardware

independent functionality

INTEGRATION / COMMISSIONING

TE

ST

& V

ER

IFIC

AT

ION

IMPLEMENTATION

PLCMCU DSP FPGA ASIC

IEC HDLC, C++

DESIGN

Environment Models

Physical Plant Models

Control / Supervisory Logic Models

RESEARCH REQUIREMENTS

Page 20: Digital Transformation#1: MATLAB e Simulink per supportare ......5 Digital Transformation: Learnings from studies and programs Customers want increasingly individualized products

21

Simulink to support Model-Based Design

Page 21: Digital Transformation#1: MATLAB e Simulink per supportare ......5 Digital Transformation: Learnings from studies and programs Customers want increasingly individualized products

22

Esempi di sviluppo di Sistemi di Controllo

per Apparati Meccatronici

Page 22: Digital Transformation#1: MATLAB e Simulink per supportare ......5 Digital Transformation: Learnings from studies and programs Customers want increasingly individualized products

23

Data-Driven ModelingFirst Principles Modeling

Neural Networks

Physical NetworksSystem

Identification

Parameter Tuning

Programming

Block Diagram

Modeling Language

Symbolic Methods

Modeling Approaches

Modeling Physical Systems with MathWorks Products

Statistical Methods

(MATLAB, C)

(Simulink)

(Simscape language)

(Symbolic MathToolbox)

(Simscape Products)

(Deep Learning Toolbox)

(Statistics & Machine Learning Toolbx)

(Simulink Design Optimization)

(System Identification Toolbox)

Page 23: Digital Transformation#1: MATLAB e Simulink per supportare ......5 Digital Transformation: Learnings from studies and programs Customers want increasingly individualized products

24

Modellazione di Sistemi a partire da Misurazioni sul Campo

Page 24: Digital Transformation#1: MATLAB e Simulink per supportare ......5 Digital Transformation: Learnings from studies and programs Customers want increasingly individualized products

25

Modeling Approaches

▪ Purpose: Model an existing design (real or virtual)

▪ Requirements:

– Relevant set of measured data is available

– Design and physical parameters will not be changed

Data-DrivenFirst Principles

Physical NetworksProgramming

Block Diagram

Modeling Language

Symbolic Methods

Neural Networks

System Identification

Statistical Methods

MeasuredModel

Page 25: Digital Transformation#1: MATLAB e Simulink per supportare ......5 Digital Transformation: Learnings from studies and programs Customers want increasingly individualized products

26

Modeling Approaches: System Identification

System

Model

+

-Minimize

errorMeasured input

Page 26: Digital Transformation#1: MATLAB e Simulink per supportare ......5 Digital Transformation: Learnings from studies and programs Customers want increasingly individualized products

27

Estimation and Validation Go Together

▪ A large enough model can reproduce a measured output arbitrarily well. We

must verify that model is relevant for other data – data that was not used for

estimation, but was collected for the same system.

Err

orNumber of parameters

Estimation data

Validation data

Page 27: Digital Transformation#1: MATLAB e Simulink per supportare ......5 Digital Transformation: Learnings from studies and programs Customers want increasingly individualized products

28

Example: Indentification of a Linear System

Page 28: Digital Transformation#1: MATLAB e Simulink per supportare ......5 Digital Transformation: Learnings from studies and programs Customers want increasingly individualized products

30

Using System Identification Toolbox

▪ Use two data sets for estimation

and validation

▪ Estimate a variety of models:

▪ Linear models – Transfer

functions, state space, etc.

▪ Nonlinear models – ARX-

type and Hammerstein-

Wiener

▪ Nonparametric – Impulse

and frequency response

▪ Grey-Box models – Models

with known structure

but unknown

parameters

Page 29: Digital Transformation#1: MATLAB e Simulink per supportare ......5 Digital Transformation: Learnings from studies and programs Customers want increasingly individualized products

31

Using an Estimated Model in Simulink

▪ Use models estimated in System

Identification Toolbox directly in a

Simulink model

▪ Blocks available for source, sink

and models

Page 30: Digital Transformation#1: MATLAB e Simulink per supportare ......5 Digital Transformation: Learnings from studies and programs Customers want increasingly individualized products

32

Modellazione di Sistemi Multifisici

Page 31: Digital Transformation#1: MATLAB e Simulink per supportare ......5 Digital Transformation: Learnings from studies and programs Customers want increasingly individualized products

33

Physical Modeling

▪ Purpose: Explore design or physical parameters

▪ Requirements:

– Physics of system are well-known

– Component-level models exist or can be created

Data-DrivenFirst Principles

Physical NetworksProgramming

Block Diagram

Modeling Language

Symbolic Methods

Page 32: Digital Transformation#1: MATLAB e Simulink per supportare ......5 Digital Transformation: Learnings from studies and programs Customers want increasingly individualized products

34

PlantController

ControllerPlant

Controller Plant

Motivation

Page 33: Digital Transformation#1: MATLAB e Simulink per supportare ......5 Digital Transformation: Learnings from studies and programs Customers want increasingly individualized products

35

Simulating plant and controller in one environment

allows you to optimize system-level performance– Automate tuning using optimization algorithms

– Accelerate process using parallel computing

Optimize System-Level Performance

Plant

+u y

Controller

s1 s2

s3

System

Actu

ato

rs

Sen

so

rs

Page 34: Digital Transformation#1: MATLAB e Simulink per supportare ......5 Digital Transformation: Learnings from studies and programs Customers want increasingly individualized products

36

System

Model

System

Specification

Detect Integration Issues Earlier

Plant

+u y

Controller

s1 s2

s3

Controls engineers and domain specialists can work together to detect integration issues in simulation

– Convert models to C code for HIL tests

– Share with internal users with fewer licenses

– Share with external users while protecting IP

System

Actu

ato

rs

Sen

so

rs

Page 35: Digital Transformation#1: MATLAB e Simulink per supportare ......5 Digital Transformation: Learnings from studies and programs Customers want increasingly individualized products

37

Build Accurate Models Quickly

▪ Simply connect the

components you need

▪ The more complex the

system, the more value

you get from Simscape

▪ Resulting model is

intuitive, easy to modify,

and easy for others

to understand

FSpring = kSpring*(xMass)

FDamper = bDamper*(dxMass

dt)

d2xMass

dt2=−FSpring − FDamper

mMass

Input/Output Block Diagram Simscape

Page 36: Digital Transformation#1: MATLAB e Simulink per supportare ......5 Digital Transformation: Learnings from studies and programs Customers want increasingly individualized products

38

Build Accurate Models Quickly

Get from specification to model even fasterSpend more time designing, less time modeling

Simscape

MATLAB, Simulink

Domain Expertise Coding Effort

Coding Eff.Domain Exp.

System

Specification

Fortran, C++

Domain Expertise Coding Effort

System

Model

Page 37: Digital Transformation#1: MATLAB e Simulink per supportare ......5 Digital Transformation: Learnings from studies and programs Customers want increasingly individualized products

39

Example: Robot Arm and Conveyer Belts

Page 38: Digital Transformation#1: MATLAB e Simulink per supportare ......5 Digital Transformation: Learnings from studies and programs Customers want increasingly individualized products

40

Example: Modeling Contact Force Between Two Solids

Page 39: Digital Transformation#1: MATLAB e Simulink per supportare ......5 Digital Transformation: Learnings from studies and programs Customers want increasingly individualized products

41

Example: Modeling a Three-Phase Inverter

Page 40: Digital Transformation#1: MATLAB e Simulink per supportare ......5 Digital Transformation: Learnings from studies and programs Customers want increasingly individualized products

42

Simscape Products

▪ Simscape platform

– Foundation libraries in many domains

– Language for defining custom blocks

▪ Extension of MATLAB

– Simulation engine and custom diagnostics

▪ Simscape add-on libraries

– Extend foundation domains with

components, effects, parameterizations

– Multibody simulation

– Editing Mode permits use of add-ons

with Simscape license only

– Models can be converted to C code

Isothermal

Liquid

Page 41: Digital Transformation#1: MATLAB e Simulink per supportare ......5 Digital Transformation: Learnings from studies and programs Customers want increasingly individualized products

43

Optimize Your Entire Engineering System

Mechanical

Electronic

Multidomain

Hydraulic

Simulate the entire system in a single environment– Does not require learning multiple tools or co-simulation

Coding Eff.

Power Systems

Simscape Domain Exp.

Multibody Coding Eff.Domain Exp.

Driveline Coding Eff.Domain Exp.

Fluids Coding Eff.Domain Exp.

Electrical Coding Eff.Domain Exp.

Plant

Model

Page 42: Digital Transformation#1: MATLAB e Simulink per supportare ......5 Digital Transformation: Learnings from studies and programs Customers want increasingly individualized products

44

Simscape Add-on Libraries

▪ Simscape Electrical

– Electronics, mechatronics, and power systems

▪ Simscape Driveline

– Gears, leadscrew, clutches, tires, engines

▪ Simscape Multibody

– Multibody systems: joints, bodies, frames

▪ Simscape Fluids

– Pumps, actuators, pipelines, valves, tanks

Page 43: Digital Transformation#1: MATLAB e Simulink per supportare ......5 Digital Transformation: Learnings from studies and programs Customers want increasingly individualized products

45

Modellazione di Sistemi a partire da Equazioni

Page 44: Digital Transformation#1: MATLAB e Simulink per supportare ......5 Digital Transformation: Learnings from studies and programs Customers want increasingly individualized products

46

▪ Purpose: Explore design or physical parameters

▪ Requirements:

– Physics of system are well-known

– System-level equations can be derived and implemented

Data-DrivenFirst Principles

Programming

Block Diagram

Modeling Language

Symbolic Methods

Equation–based Modeling

Page 45: Digital Transformation#1: MATLAB e Simulink per supportare ......5 Digital Transformation: Learnings from studies and programs Customers want increasingly individualized products

47

Customize and Extend Simscape Libraries for a Custom DC Motor

Page 46: Digital Transformation#1: MATLAB e Simulink per supportare ......5 Digital Transformation: Learnings from studies and programs Customers want increasingly individualized products

48

Dal Disegno Meccanico alla Regolazione dell’unità di

Motion Control per un sistema Meccatronico

Page 47: Digital Transformation#1: MATLAB e Simulink per supportare ......5 Digital Transformation: Learnings from studies and programs Customers want increasingly individualized products

49

Optimizing Time-Domain Responses of a Simulink Model

▪ Specify desired behavior by either graphically shaping the

desired response or typing in numeric values

▪ Add design requirements without adding blocks to the

model

▪ Use multiple objectives and constraints simultaneously

▪ Monitor all plots in one window

▪ Perform optimization faster with Parallel Computing

Toolbox and Fast Restart

Page 48: Digital Transformation#1: MATLAB e Simulink per supportare ......5 Digital Transformation: Learnings from studies and programs Customers want increasingly individualized products

50

Progettazione del sistema di regolazione del tiro per film plastici

Closed-loop model

Control logic

Outputs

Page 49: Digital Transformation#1: MATLAB e Simulink per supportare ......5 Digital Transformation: Learnings from studies and programs Customers want increasingly individualized products

51

What is Stateflow?

Extend Simulink with state charts and flow graphs

Design supervisory control, scheduling, and mode logic

Model state discontinuities and instantaneous events

Page 50: Digital Transformation#1: MATLAB e Simulink per supportare ......5 Digital Transformation: Learnings from studies and programs Customers want increasingly individualized products

52

How Does Stateflow Work with Simulink?

Simulink excels at continuous changes in dynamic systems.

Stateflow excels at instantaneous changes in dynamic systems.

Real-world systems have to respond to both continuous and

instantaneous changes.

suspension dynamics

gear changespropulsion system

liftoff stages

manufacturing robot

operation modes

Use both Simulink and Stateflow so that you can use the right tool for the right job.

Page 51: Digital Transformation#1: MATLAB e Simulink per supportare ......5 Digital Transformation: Learnings from studies and programs Customers want increasingly individualized products

53

Key Takeaways

▪ MATLAB e Simulink forniscono un ambiente integrato per sviluppare

progetti innovativi all’interno del paradigma di Industry 4.0

▪ MATLAB e Simulink supportano efficacemente la modellazione &

simulazione di sistemi complessi, fornendo:

1. strumenti per intercettare eventuali errori nelle fasi preliminari

2. funzionalità per limitarne l’introduzione accidentale.

▪ MATLAB e Simulink garantiscono un supporto completo e un flusso di

lavoro ininterrotto all’interno del Model-Based Design

Page 52: Digital Transformation#1: MATLAB e Simulink per supportare ......5 Digital Transformation: Learnings from studies and programs Customers want increasingly individualized products

54

MATLAB e Simulink per supportare

Modellazione & Simulazione dei sistemi in Industry 4.0