mathematical modeling using matlab - mathworks · symbolic: - exact solution in form of analytical...

17
1 © 2013 The MathWorks, Inc. Mathematical Modeling using MATLAB Amit Doshi Application Engineer - Technical Computing [email protected] 21 st Aug 2013 Bangalore

Upload: others

Post on 17-May-2020

14 views

Category:

Documents


0 download

TRANSCRIPT

1 © 2013 The MathWorks, Inc.

Mathematical Modeling using MATLAB

Amit Doshi Application Engineer - Technical Computing

[email protected]

21st Aug 2013

Bangalore

2

A B

Determine acceleration profile that minimizes

payload swing

Demo : Modeling Gantry Crane

s25s4

s20s1

s20s1

:sConstraint

2

1

21

f

p

p

ppf

t

t

t

ttt

Payload

3

4

Agenda

Mathematical Modeling using MATLAB

1. Mathematical Modeling – Basics

2. Deriving and Solving Equation of Motion

3. Optimization and Parallel Computing for

Better Performance and Accuracy

4. Documentation Using MATLAB

DEMO : Modeling Gantry Crane

5

What is Mathematical Modeling?

Use of mathematical language to describe a system or

process

Mathematical

model

Input Output

Some simple examples

Lift on aircraft wing

2

222

L

xLnWq to

l

where ..

q = lift

L = length of wing

x = position along wing

W = total aircraft weight

n = load factor

Fixed deposit calculator

where ..

6

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

7

What are the Challenges in Mathematical Modeling?

Getting mathematical derivations into a software is not straight forward

Optimizing a system is complex and takes a lot of efforts

Calculations take too long time to converge

Documenting finished project is a task by itself

8

Approach towards Modeling Gantry Crane

Access Tasks

Derivation & solving

Optimization

Goal

Report

Approach:

• Derive equations of

motion

• Solve equation of motion

using ODE solver

• Determine the best

acceleration profile using

optimization

• Generate report

bang-coast-bang

Basic

Math/Physics

Equations

9

Derive equation symbolically

time x(t)

0 0

0.1 0.099

0.2 0.193

0.3 0.283

0.4 0.364

0.5 0.437

Numeric:

- Approximate solution in vector form

Governing equation:

Symbolic:

- Exact solution in form of analytical expression

Initial conditions:

10

Sharing

From MATLAB: From Notebook app:

Perform symbolic computations using

familiar MATLAB syntax Conveniently manage & document symbolic

computations

Math notation, embedded text & graphics

Access complete MuPAD language

15+ libraries of symbolic math functions

Derive equation symbolically in MATLAB

11

Determining the Acceleration

Profile of Gantry Crane in

MATLAB

12

Solving Big Problems

Large data

Problem

Long running

Computationally

intensive

Wait

Load data onto

multiple machines

that work together

in parallel

Solution

Run similar tasks

on independent

processors in

parallel

Reduce size

of problem

You could…

13

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

14

Summary: Modeling Gantry Crane

Equations

Access

Derived Equation

in notebook

(symbolic)

Solved and optimized

the equation

Computed results in

parallel

Generated a ‘.pdf’

report from

MATLAB

Share

Report

Explore and Create

Derivation & solving

Optimization

Products Used MATLAB

Symbolic Math Toolbox

Optimization Toolbox

Global Optimization Toolbox

Parallel Computing Toolbox

1 2 3

15

Mathematical modeling: Challenges Addressed

Getting mathematical derivations into a software is not straight forward

Optimizing a system is complex and takes a lot of efforts

Calculations take too long time to converge

Documenting finished project is a task by itself

16

Questions?

17

THANK YOU !!!