Mathematical Modeling Using MATLAB - MathWorks

Transcription

Mathematical Modeling using MATLABU.M. SundarSenior Application Engineer – Technical computingsundar.umamaheswaran@mathworks.in 2012 The MathWorks, Inc.1

Agenda Challenges in Mathematical ModelingIntroduction to Mathematical Modeling TechniquesMathematical Modeling of a Real World System Deriving and Solving Governing Equations Modeling Systems using Field DataMathWorks Services an overview2

ChallengesGetting from mathematical concepts to a software modelValidation and optimization of the mathematical model against requirementsAcquiring field data from files, field instruments, and test rigsCharacterizing systems using field dataRepresenting real-world datasets as optimized lookup tablesUtilizing the power of multiple processing cores to speed up calculationsDeploying models across a whole organization3

What is mathematical modeling? Use of mathematical language to describe asystem or processInput MathematicalmodelOutputSome simple examples2Wto n L2 x 2ql L2 Lift on aircraft wingEL f (T , t , DP,.)Electricity load4

Why develop mathematical models? Forecast system behaviorPredict and gain insight into systembehavior for various “what-if” scenarios– Enables critical decisions– Reduces the need for testing Optimize system behaviorIdentify parameters that optimizesystem performance Design control systemsDevelop model to represent plantduring control system design5

Different Modeling ApproachesModeling ApproachesFirst Principles ModelingData-Driven Modeling6

Both have advantages & disadvantagesComplete Modeling EnvironmentData-Driven ModelingFirst-Principles ModelingAdvantages:Advantages: Fast Accurate Insight in behavior Physical parametersDisadvantages:Disadvantages: Requires plant Requires data acquisition system Time-consuming Requires expertise7

Modeling with Governing Equations (or)First Principles ModelingAccessFilesDataSoftwareExplore & CreateReports andReportDocumentationSurface fittingData eE V2RyAlgorithmDevelopmentDerivation & onApplicationsReportOutputs for DesignApplicationEquationsF ma8

Demo: Modeling aircraft wing loadsProblem: Determine whether bending moments onaircraft wing are within design limitWorkflow: Derive analytical models for wing loadsand bending momentSimulate bending moment for different“what if” scenariosAnalyze simulation results to determinewhether worst-case bending moments arewithin design limit9

Demonstration:Analytical Modeling of Aircraft wing forcesql(x)Load 1: Aerodynamic lift1/21/2Load 2: Structural loadqw(x)l f /2Load 3: Fuel Loadqf(x)10

Modeling with Governing Equations (or)First Principles ModelingAccessFilesDataSoftwareExplore & CreateReports andReportDocumentationSurface fittingData eE V2RyAlgorithmDevelopmentDerivation & onApplicationsReportOutputs for DesignApplicationEquationsF maAutomate11

Data Driven Modeling WorkflowAccessExplore & DiscoverFilesData Analysis& ModelingSoftwareAlgorithmDevelopmentShareReporting andDocumentationOutputs for DesignCode & nt12

Data Driven Modeling Using StatisticalMethods Two common challenges in creating an accurate curve fitCan’t describe the relationshipbetween your variablesCan’t specify good starting pointsfor your solvers13

Challenge 1Generating a Good FitWithout Domain Knowledge14

Regression Techniques Require that the user specify a modelChoice of model is based on domain knowledgeExample - Population modelsLogistic GrowthExponential Growth15

What if you don’t know what type of model touse?16

What if you don’t know what type of model touse?Line ?Quadratic ?Rational ?17

Workflow – Non-Parametric Fitting Get the data to fit, intoMATLAB Data AccessPerform non-parametriccurve fittingCross validate usingstatistical methodsCompare resultsExplore and CreateCurveFitting Automatic publishShare MATLAB sSoftware18

Data Driven Modeling WorkflowAccessExplore & DiscoverFilesData Analysis& ModelingSoftwareAlgorithmDevelopmentShareReporting andDocumentationOutputs for DesignCode & ntAutomate19

Solving Big ProblemsProblemYou could Long runningComputationallyintensiveLarge data setWaitReduce sizeof problemSolutionsRun similar taskson independentprocessors inparallelLoad data ontomultiple machinesthat work togetherin parallel20

Task Parallel rkerTask 1Task 2TimeTask 3Task 4Time21

Parallel Computing enables you to Work with Large DataSpeed Up Computations11 26 4112 27 4213 28 4314 29 4415 30 4516 31 4617 32 4717 33 48Task 1Task 2Task 3Task 419 34 4920 35 5021 36 5122 37 5222

Model-BasedCalibration ToolboxBioinformaticsToolboxSimulink DesignOptimizationSystem TestGlobal OptimizationToolboxBuilt in parallel functionalitywithin specific toolboxes(also requires ParallelComputing Toolbox)Optimization Toolbox Statistics ToolboxParallel Computing with MATLABMATLAB and Parallel Computing Tools High level parallel functions Low level parallel functionsjobs, tasks Built on industrystandard librariesIndustry LibrariesparformatlabpoolbatchMessage Passing Interface (MPI)ScaLAPACK23

Writing Parallel CodeNo code changes Other toolboxes:Optimization Toolbox Genetic Algorithm and Direct Search Toolbox SystemTest Trivial changes parfordistributed arraysjobs and tasks MATLAB MPI 24

Deploying MATLAB ABCompiler.dll2525

Deploying Applications with MATLAB Give MATLAB code toother usersMATLAB Compiler Share applications withend users who do nothave MATLAB– Use MATLAB Compilerto create standaloneexecutables andshared librariesMATLABBuilder EX.exe.dll.libMATLABBuilder JAMATLABBuilder NEJava– Use MATLAB Compileradd-ons to create softwarecomponents26

Training ServicesExploit the full potential of MathWorks productsFlexible delivery options: Public training available in several citiesOnsite training with standard orcustomized coursesWeb-based training with live, interactiveinstructor-led coursesMore than 30 course offerings: Introductory and intermediate training on MATLAB, Simulink,Stateflow, code generation, and Polyspace productsSpecialized courses in control design, signal processing, parallel computing,code generation, communications, financial analysis,and other areaswww.mathworks.in/training27

Public Trainings in the next Few MonthsCourseDatesLocationSimulink for System and Algorithm Modeling20 Aug 2012 – 21 Aug 2012BangaloreEmbedded Coder for Production CodeGeneration22 Aug 2012 – 24 Aug 2012BangaloreMATLAB Fundamentals03 Sep 2012 – 05 Sep 2012BangaloreMATLAB Programming Techniques06 Sep 2012 – 07 Sep 2012BangaloreMATLAB Fundamentals24 Sep 2012 – 26 Sep 2012PuneSimulink for System and Algorithm Modeling27 Sep 2012 – 28 Sep 2012PuneStatistical Methods in MATLAB15 Oct 2012 – 16 Oct 2012Bangalore17 Oct 2012Bangalore18 Oct 2012 – 19 Oct 2012BangaloreMATLAB Based Optimization TechniquesStateflow for Logic-Driven System ModelingEmail: training@mathworks.inURL: http://www.mathworks.in/services/trainingPhone: 080-6632-600028

Consulting ServicesProcess & TechnologyAutomationProcess & TechnologyStandardizationProcess Establishment/AssessmentFull ApplicationDeploymentComponentDeploymentAdvisory ServicesJumpstartResearchMigration PlanningAdv EngineeringProduct Engineering TeamsContinuous ImprovementA global team of experts provide support from initial project startup through integrated processautomation to increase productivity and maximize the value of product investmentsSupplier Involvementwww.mathworks.com/consulting29

MATLAB for Quantitative Tools to Manage RiskChallengeIntuitive Analytics wanted to develop a set of quantitative toolsthat minimizes the expected cost or risk a government incurswhen managing a capital structure.“I estimate that we can develop 90% fasterwith MathWorks tools than we could withC/C or Visual Basic.” - Peter Orr, IntuitiveAnalytics, Inc.Solution (with the help of MathWorks’ Consulting) Able to use MathWorks tools to develop algorithms, visualizeresults, and simplify deployment of an advanced analyticaltoolValue Development productivity increased by 90% Deployment simplified Visual environment createdUsing MATLAB developmenttools to provide visualrepresentations of interest ratemodels.Using MATLAB development tools toprovide visual representations ofinterest rate modelsFor more information:http://www.mathworks.com/tagteam/51834 91408v02 intutive.pdf30

MathWorks India Contact DetailsURL: http://www.mathworks.inE-mail: info@mathworks.inTechnical Support: www.mathworks.in/myservicerequestsTel: 91-80-6632 6000Fax: 91-80-6632 6010 MathWorks India Private LimitedSalarpuria Windsor BuildingThird Floor, 'A' WingNo.3 Ulsoor RoadBangalore - 560042, KarnatakaIndiaThank You for AttendingTalk to Us – We are Happy to Support You31

Fitting Statistical Analysis . 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