digital transformation#1: matlab e simulink per supportare ......5 digital transformation: learnings...
TRANSCRIPT
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
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
4
Digital Transformation Industriale: opportunità, sfide e
soluzioni per lo sviluppo prodotto
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”
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
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
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
9
Approaches and Enablers
to address these Challenges
10
Key Enabler: Mechatronics
Combination of mechanical-, computer-,
telecommunications-, systems- and control
engineering with electronics
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
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
13
MATLAB e Simulink per
Modellazione & Simulazione di sistemi virtuali
in Industry 4.0
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
15
Modellazione e Simulazione in Industry 4.0
16
Modellazione e Simulazione in Industry 4.0
“Product Life Cycle Risk Management”, Jan Machac, Frantisek Steiner and Jiri Tupa, 2017
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?
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
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
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
21
Simulink to support Model-Based Design
22
Esempi di sviluppo di Sistemi di Controllo
per Apparati Meccatronici
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)
24
Modellazione di Sistemi a partire da Misurazioni sul Campo
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
26
Modeling Approaches: System Identification
System
Model
+
-Minimize
errorMeasured input
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
28
Example: Indentification of a Linear System
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
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
32
Modellazione di Sistemi Multifisici
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
34
PlantController
ControllerPlant
Controller Plant
Motivation
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
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
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
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
39
Example: Robot Arm and Conveyer Belts
40
Example: Modeling Contact Force Between Two Solids
41
Example: Modeling a Three-Phase Inverter
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
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
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
45
Modellazione di Sistemi a partire da Equazioni
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
47
Customize and Extend Simscape Libraries for a Custom DC Motor
48
Dal Disegno Meccanico alla Regolazione dell’unità di
Motion Control per un sistema Meccatronico
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
50
Progettazione del sistema di regolazione del tiro per film plastici
Closed-loop model
Control logic
Outputs
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
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.
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
54
MATLAB e Simulink per supportare
Modellazione & Simulazione dei sistemi in Industry 4.0