Mathematical Modeling using MATLAB - · PDF file• Introduction to Mathematical Modeling...
Transcript of Mathematical Modeling using MATLAB - · PDF file• Introduction to Mathematical Modeling...
![Page 1: Mathematical Modeling using MATLAB - · PDF file• Introduction to Mathematical Modeling Techniques ... add-ons to create software ... A global team of experts provide support from](https://reader031.fdocuments.us/reader031/viewer/2022030507/5ab6d0a77f8b9ab7638e1f78/html5/thumbnails/1.jpg)
1 © 2012 The MathWorks, Inc.
Mathematical Modeling using MATLAB
U.M. Sundar
Senior Application Engineer – Technical computing
![Page 2: Mathematical Modeling using MATLAB - · PDF file• Introduction to Mathematical Modeling Techniques ... add-ons to create software ... A global team of experts provide support from](https://reader031.fdocuments.us/reader031/viewer/2022030507/5ab6d0a77f8b9ab7638e1f78/html5/thumbnails/2.jpg)
2
Agenda
• Challenges in Mathematical Modeling
• Introduction to Mathematical Modeling Techniques
• Mathematical Modeling of a Real World System • Deriving and Solving Governing Equations
• Modeling Systems using Field Data
• MathWorks Services an overview
![Page 3: Mathematical Modeling using MATLAB - · PDF file• Introduction to Mathematical Modeling Techniques ... add-ons to create software ... A global team of experts provide support from](https://reader031.fdocuments.us/reader031/viewer/2022030507/5ab6d0a77f8b9ab7638e1f78/html5/thumbnails/3.jpg)
3
Challenges
Getting from mathematical concepts to a software model
Validation and optimization of the mathematical model against requirements
Acquiring field data from files, field instruments, and test rigs
Characterizing systems using field data
Representing real-world datasets as optimized lookup tables
Utilizing the power of multiple processing cores to speed up calculations
Deploying models across a whole organization
![Page 4: Mathematical Modeling using MATLAB - · PDF file• Introduction to Mathematical Modeling Techniques ... add-ons to create software ... A global team of experts provide support from](https://reader031.fdocuments.us/reader031/viewer/2022030507/5ab6d0a77f8b9ab7638e1f78/html5/thumbnails/4.jpg)
4
What is mathematical modeling?
Use of mathematical language to describe a
system or process
Mathematical
model
Input Output
2
222
L
xLnWq to
l
Lift on aircraft wing Electricity load
,...),,( DPtTfEL
Some simple examples
![Page 5: Mathematical Modeling using MATLAB - · PDF file• Introduction to Mathematical Modeling Techniques ... add-ons to create software ... A global team of experts provide support from](https://reader031.fdocuments.us/reader031/viewer/2022030507/5ab6d0a77f8b9ab7638e1f78/html5/thumbnails/5.jpg)
5
Why develop mathematical models?
Forecast system behavior
Predict and gain insight into system
behavior for various “what-if” scenarios
– Enables critical decisions
– Reduces the need for testing
Optimize system behavior
Identify parameters that optimize
system performance
Design control systems
Develop model to represent plant
during control system design
![Page 6: Mathematical Modeling using MATLAB - · PDF file• Introduction to Mathematical Modeling Techniques ... add-ons to create software ... A global team of experts provide support from](https://reader031.fdocuments.us/reader031/viewer/2022030507/5ab6d0a77f8b9ab7638e1f78/html5/thumbnails/6.jpg)
6
Data-Driven Modeling First Principles Modeling
Modeling Approaches
Different Modeling Approaches
![Page 7: Mathematical Modeling using MATLAB - · PDF file• Introduction to Mathematical Modeling Techniques ... add-ons to create software ... A global team of experts provide support from](https://reader031.fdocuments.us/reader031/viewer/2022030507/5ab6d0a77f8b9ab7638e1f78/html5/thumbnails/7.jpg)
7
Both have advantages & disadvantages
Data-Driven Modeling First-Principles Modeling Complete Modeling Environment
Advantages: Insight in behavior
Physical parameters
Disadvantages: Time-consuming
Requires expertise
Advantages: Fast
Accurate
Disadvantages: Requires plant
Requires data acquisition system
![Page 8: Mathematical Modeling using MATLAB - · PDF file• Introduction to Mathematical Modeling Techniques ... add-ons to create software ... A global team of experts provide support from](https://reader031.fdocuments.us/reader031/viewer/2022030507/5ab6d0a77f8b9ab7638e1f78/html5/thumbnails/8.jpg)
8
Modeling with Governing Equations (or)
First Principles Modeling
Equations
Data Surface fitting
Share Access Explore & Create
Derivation & solving
Optimization
Report
Application
Report
Application
Share Access
Reports and
Documentation
Outputs for Design
Applications
Explore & Create
Data Analysis Files
Hardware
Software Mathematical
Modeling
x y E = V2
R
Equations
F = ma
Algorithm
Development
Application
Development
![Page 9: Mathematical Modeling using MATLAB - · PDF file• Introduction to Mathematical Modeling Techniques ... add-ons to create software ... A global team of experts provide support from](https://reader031.fdocuments.us/reader031/viewer/2022030507/5ab6d0a77f8b9ab7638e1f78/html5/thumbnails/9.jpg)
9
Demo: Modeling aircraft wing loads
Problem:
Determine whether bending moments on
aircraft wing are within design limit
Workflow:
Derive analytical models for wing loads
and bending moment
Simulate bending moment for different
“what if” scenarios
Analyze simulation results to determine
whether worst-case bending moments are
within design limit
![Page 10: Mathematical Modeling using MATLAB - · PDF file• Introduction to Mathematical Modeling Techniques ... add-ons to create software ... A global team of experts provide support from](https://reader031.fdocuments.us/reader031/viewer/2022030507/5ab6d0a77f8b9ab7638e1f78/html5/thumbnails/10.jpg)
10
Demonstration: Analytical Modeling of Aircraft wing forces
Load 1: Aerodynamic lift
Load 2: Structural load
Load 3: Fuel Load
1/2
1/2
l f /2
ql(x)
qw(x)
qf(x)
![Page 11: Mathematical Modeling using MATLAB - · PDF file• Introduction to Mathematical Modeling Techniques ... add-ons to create software ... A global team of experts provide support from](https://reader031.fdocuments.us/reader031/viewer/2022030507/5ab6d0a77f8b9ab7638e1f78/html5/thumbnails/11.jpg)
11
Modeling with Governing Equations (or)
First Principles Modeling
Equations
Data Surface fitting
Share Access Explore & Create
Derivation & solving
Optimization
Report
Application
Report
Application
Share Access
Reports and
Documentation
Outputs for Design
Applications
Explore & Create
Data Analysis Files
Hardware
Software Mathematical
Modeling
x y E = V2
R
Equations
F = ma
Algorithm
Development
Application
Development
Automate
![Page 12: Mathematical Modeling using MATLAB - · PDF file• Introduction to Mathematical Modeling Techniques ... add-ons to create software ... A global team of experts provide support from](https://reader031.fdocuments.us/reader031/viewer/2022030507/5ab6d0a77f8b9ab7638e1f78/html5/thumbnails/12.jpg)
12
Explore & Discover
Data Driven Modeling Workflow
Reporting and
Documentation
Outputs for Design
Deployment
Share
Data Analysis
& Modeling
Algorithm
Development
Files
Software
Hardware
Access
Code & Applications
Application
Development
![Page 13: Mathematical Modeling using MATLAB - · PDF file• Introduction to Mathematical Modeling Techniques ... add-ons to create software ... A global team of experts provide support from](https://reader031.fdocuments.us/reader031/viewer/2022030507/5ab6d0a77f8b9ab7638e1f78/html5/thumbnails/13.jpg)
13
Data Driven Modeling Using Statistical
Methods
Two common challenges in creating an accurate curve fit
Can’t describe the relationship
between your variables
Can’t specify good starting points
for your solvers
![Page 14: Mathematical Modeling using MATLAB - · PDF file• Introduction to Mathematical Modeling Techniques ... add-ons to create software ... A global team of experts provide support from](https://reader031.fdocuments.us/reader031/viewer/2022030507/5ab6d0a77f8b9ab7638e1f78/html5/thumbnails/14.jpg)
14
Challenge 1
Generating a Good Fit
Without Domain Knowledge
![Page 15: Mathematical Modeling using MATLAB - · PDF file• Introduction to Mathematical Modeling Techniques ... add-ons to create software ... A global team of experts provide support from](https://reader031.fdocuments.us/reader031/viewer/2022030507/5ab6d0a77f8b9ab7638e1f78/html5/thumbnails/15.jpg)
15
Regression Techniques
Require that the user specify a model
Choice of model is based on domain knowledge
Example - Population models
Logistic Growth
Exponential Growth
![Page 16: Mathematical Modeling using MATLAB - · PDF file• Introduction to Mathematical Modeling Techniques ... add-ons to create software ... A global team of experts provide support from](https://reader031.fdocuments.us/reader031/viewer/2022030507/5ab6d0a77f8b9ab7638e1f78/html5/thumbnails/16.jpg)
16
What if you don’t know what type of model to
use?
![Page 17: Mathematical Modeling using MATLAB - · PDF file• Introduction to Mathematical Modeling Techniques ... add-ons to create software ... A global team of experts provide support from](https://reader031.fdocuments.us/reader031/viewer/2022030507/5ab6d0a77f8b9ab7638e1f78/html5/thumbnails/17.jpg)
17
Line ??? Quadratic ??? Rational ???
What if you don’t know what type of model to
use?
![Page 18: Mathematical Modeling using MATLAB - · PDF file• Introduction to Mathematical Modeling Techniques ... add-ons to create software ... A global team of experts provide support from](https://reader031.fdocuments.us/reader031/viewer/2022030507/5ab6d0a77f8b9ab7638e1f78/html5/thumbnails/18.jpg)
18
Workflow – Non-Parametric Fitting
Share Explore and Create Data Access
Report
Application
Files Software
Curve
Fitting Statistical
Analysis
Get the data to fit, into
MATLAB
Perform non-parametric
curve fitting
Cross validate using
statistical methods
Compare results
Automatic publish
Share MATLAB files
![Page 19: Mathematical Modeling using MATLAB - · PDF file• Introduction to Mathematical Modeling Techniques ... add-ons to create software ... A global team of experts provide support from](https://reader031.fdocuments.us/reader031/viewer/2022030507/5ab6d0a77f8b9ab7638e1f78/html5/thumbnails/19.jpg)
19
Explore & Discover
Data Driven Modeling Workflow
Reporting and
Documentation
Outputs for Design
Deployment
Share
Data Analysis
& Modeling
Algorithm
Development
Files
Software
Hardware
Access
Code & Applications
Application
Development
Automate
![Page 20: Mathematical Modeling using MATLAB - · PDF file• Introduction to Mathematical Modeling Techniques ... add-ons to create software ... A global team of experts provide support from](https://reader031.fdocuments.us/reader031/viewer/2022030507/5ab6d0a77f8b9ab7638e1f78/html5/thumbnails/20.jpg)
20
Solving Big Problems
Large data set
Problem
Long running
Computationally
intensive
Wait
Load data onto
multiple machines
that work together
in parallel
Solutions
Run similar tasks
on independent
processors in
parallel
Reduce size
of problem
You could…
![Page 21: Mathematical Modeling using MATLAB - · PDF file• Introduction to Mathematical Modeling Techniques ... add-ons to create software ... A global team of experts provide support from](https://reader031.fdocuments.us/reader031/viewer/2022030507/5ab6d0a77f8b9ab7638e1f78/html5/thumbnails/21.jpg)
21
Task 1 Task 2 Task 3 Task 4 Task 1 Task 2 Task 3 Task 4
Task Parallel Applications
Time Time
TOOLBOXES
BLOCKSETS
Worker
Worker
Worker
Worker
![Page 22: Mathematical Modeling using MATLAB - · PDF file• Introduction to Mathematical Modeling Techniques ... add-ons to create software ... A global team of experts provide support from](https://reader031.fdocuments.us/reader031/viewer/2022030507/5ab6d0a77f8b9ab7638e1f78/html5/thumbnails/22.jpg)
22
Parallel Computing enables you to …
11 26 41
12 27 42
13 28 43
14 29 44
15 30 45
16 31 46
17 32 47
17 33 48
19 34 49
20 35 50
21 36 51
22 37 52
Speed Up Computations Work with Large Data
Task 1 Task 2 Task 3 Task 4 Task 4 Task 3 Task 2 Task 1
![Page 23: Mathematical Modeling using MATLAB - · PDF file• Introduction to Mathematical Modeling Techniques ... add-ons to create software ... A global team of experts provide support from](https://reader031.fdocuments.us/reader031/viewer/2022030507/5ab6d0a77f8b9ab7638e1f78/html5/thumbnails/23.jpg)
23
MATLAB and Parallel Computing Tools
Industry Libraries
Message Passing Interface (MPI)
Parallel Computing with MATLAB
Built in parallel functionality
within specific toolboxes
(also requires Parallel
Computing Toolbox)
High level parallel functions
Low level parallel functions
Built on industry
standard libraries
matlabpool batch parfor
jobs, tasks
ScaLAPACK
Op
tim
iza
tio
n T
oo
lbo
x
Glo
ba
l Op
tim
iza
tio
n
To
olb
ox
Syst
em
Test
Sim
uli
nk
Desi
gn
O
pti
miz
ati
on
Bio
info
rma
tics
To
olb
ox
Mo
del-
Ba
sed
C
ali
bra
tio
n T
oo
lbo
x
Sta
tist
ics
To
olb
ox
![Page 24: Mathematical Modeling using MATLAB - · PDF file• Introduction to Mathematical Modeling Techniques ... add-ons to create software ... A global team of experts provide support from](https://reader031.fdocuments.us/reader031/viewer/2022030507/5ab6d0a77f8b9ab7638e1f78/html5/thumbnails/24.jpg)
24
Writing Parallel Code
Other toolboxes:
Optimization Toolbox™
Genetic Algorithm and Direct Search Toolbox™
SystemTest™
parfor
distributed arrays
jobs and tasks
MATLAB MPI
No code changes
Trivial changes
![Page 25: Mathematical Modeling using MATLAB - · PDF file• Introduction to Mathematical Modeling Techniques ... add-ons to create software ... A global team of experts provide support from](https://reader031.fdocuments.us/reader031/viewer/2022030507/5ab6d0a77f8b9ab7638e1f78/html5/thumbnails/25.jpg)
25
MATLAB Desktop
End-User Machine
1
2
3 Toolboxes
Deploying MATLAB Models
MATLAB Compiler
.dll
25
![Page 26: Mathematical Modeling using MATLAB - · PDF file• Introduction to Mathematical Modeling Techniques ... add-ons to create software ... A global team of experts provide support from](https://reader031.fdocuments.us/reader031/viewer/2022030507/5ab6d0a77f8b9ab7638e1f78/html5/thumbnails/26.jpg)
26
Give MATLAB code to
other users
Share applications with
end users who do not
have MATLAB
– Use MATLAB Compiler
to create standalone
executables and
shared libraries
– Use MATLAB Compiler
add-ons to create software
components
.exe .dll
.lib
MATLAB Compiler
Java
MATLAB Builder NE
MATLAB Builder EX
MATLAB Builder JA
Deploying Applications with MATLAB
![Page 27: Mathematical Modeling using MATLAB - · PDF file• Introduction to Mathematical Modeling Techniques ... add-ons to create software ... A global team of experts provide support from](https://reader031.fdocuments.us/reader031/viewer/2022030507/5ab6d0a77f8b9ab7638e1f78/html5/thumbnails/27.jpg)
27
Training Services Exploit the full potential of MathWorks products
Flexible delivery options:
Public training available in several cities
Onsite training with standard or customized courses
Web-based training with live, interactive
instructor-led courses
More than 30 course offerings:
Introductory and intermediate training on MATLAB, Simulink,
Stateflow, code generation, and Polyspace products
Specialized courses in control design, signal processing, parallel computing,
code generation, communications, financial analysis,
and other areas
www.mathworks.in/training
![Page 28: Mathematical Modeling using MATLAB - · PDF file• Introduction to Mathematical Modeling Techniques ... add-ons to create software ... A global team of experts provide support from](https://reader031.fdocuments.us/reader031/viewer/2022030507/5ab6d0a77f8b9ab7638e1f78/html5/thumbnails/28.jpg)
28
Public Trainings in the next Few Months
Course Dates Location
Simulink for System and Algorithm Modeling 20 Aug 2012 – 21 Aug 2012 Bangalore
Embedded Coder for Production Code
Generation 22 Aug 2012 – 24 Aug 2012 Bangalore
MATLAB Fundamentals 03 Sep 2012 – 05 Sep 2012 Bangalore
MATLAB Programming Techniques 06 Sep 2012 – 07 Sep 2012 Bangalore
MATLAB Fundamentals 24 Sep 2012 – 26 Sep 2012 Pune
Simulink for System and Algorithm Modeling 27 Sep 2012 – 28 Sep 2012 Pune
Statistical Methods in MATLAB 15 Oct 2012 – 16 Oct 2012 Bangalore
MATLAB Based Optimization Techniques 17 Oct 2012 Bangalore
Stateflow for Logic-Driven System Modeling 18 Oct 2012 – 19 Oct 2012 Bangalore
Email: [email protected] URL: http://www.mathworks.in/services/training Phone: 080-6632-6000
![Page 29: Mathematical Modeling using MATLAB - · PDF file• Introduction to Mathematical Modeling Techniques ... add-ons to create software ... A global team of experts provide support from](https://reader031.fdocuments.us/reader031/viewer/2022030507/5ab6d0a77f8b9ab7638e1f78/html5/thumbnails/29.jpg)
29
Consulting Services
www.mathworks.com/consulting
A global team of experts provide support from initial project startup through integrated process
automation to increase productivity and maximize the value of product investments
Supplier Involvement Product Engineering Teams
Migration Planning
Component Deployment
Full Application Deployment
Adv Engineering
Co
nti
nu
ou
s Im
pro
vem
en
t
Research
Advisory Services
Process Establishment/
Assessment
Jumpstart
Process & Technology
Standardization
Process & Technology
Automation
![Page 30: Mathematical Modeling using MATLAB - · PDF file• Introduction to Mathematical Modeling Techniques ... add-ons to create software ... A global team of experts provide support from](https://reader031.fdocuments.us/reader031/viewer/2022030507/5ab6d0a77f8b9ab7638e1f78/html5/thumbnails/30.jpg)
30
MATLAB for Quantitative Tools to Manage Risk
Challenge
Intuitive Analytics wanted to develop a set of quantitative tools that minimizes the expected cost or risk a government incurs
when managing a capital structure.
Solution (with the help of MathWorks’ Consulting)
Able to use MathWorks tools to develop algorithms, visualize results, and simplify deployment of an advanced analytical
tool
Value
Development productivity increased by 90%
Deployment simplified
Visual environment created
For more information:
http://www.mathworks.com/tagteam/51834_91408v02_intutive.pdf
Using MATLAB development
tools to provide visual
representations of interest rate
models.
“I estimate that we can develop 90% faster
with MathWorks tools than we could with
C/C++ or Visual Basic.” - Peter Orr, Intuitive
Analytics, Inc.
Using MATLAB development tools to
provide visual representations of interest rate models
![Page 31: Mathematical Modeling using MATLAB - · PDF file• Introduction to Mathematical Modeling Techniques ... add-ons to create software ... A global team of experts provide support from](https://reader031.fdocuments.us/reader031/viewer/2022030507/5ab6d0a77f8b9ab7638e1f78/html5/thumbnails/31.jpg)
31
MathWorks India Contact Details
URL: http://www.mathworks.in
E-mail: [email protected]
Technical Support: www.mathworks.in/myservicerequests
Tel: +91-80-6632 6000
Fax: +91-80-6632 6010
• MathWorks India Private Limited Salarpuria Windsor Building Third Floor, 'A' Wing No.3 Ulsoor Road Bangalore - 560042, Karnataka India
Thank You for Attending
Talk to Us – We are Happy to Support You