1 / 31

S pe c i al T op i c s

S pe c i al T op i c s. 3 . 58. M on te Car l o s i m ul at ion Mon t e C a r l o me t hod. S pe c i al T op i c s. 3 . 59. I n t r odu c ti o n C oncept I n s pi r e d b y idea s unde r l y in g ga m bling Rando m ne ss, ei t he r i n inpu ts o r m odel , …

armstrong
Télécharger la présentation

S pe c i al T op i c s

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. SpecialTopics 3.58 MonteCarlosimulation MonteCarlomethod

  2. SpecialTopics 3.59 • Introduction • Concept • Inspiredbyideasunderlyinggambling • Randomness,eitherin inputsormodel,… • …exploitedtoexplorerangeofpossibleoutcomes • Twosimilarbutdifferent variations • Stochastic inputs,deterministicmodel,explicittime • Deterministicinputs,stochastic model,implicittime

  3. SpecialTopics 3.60 MonteCarlosimulation Stochastically varyingresults Stochastically varying initial conditions MCv1 Deterministic simulation Probabilitydistributions usedto modelvariability ininitialconditions Multiplerunswith run-to-runvariabilityinresults; analyzedstatistically Oftentime-stepped physics-basedmodel; timerepresentedexplicitly Stochastically varyingresults MCv2 Fixed initial conditions Stochastic simulation Specificknownor given initialconditions Multiplerunswith run-to-runvariabilityinresults; analyzedstatistically Probabilitydistributions usedto modelvariability insimulandprocesses; oftennoexplicit representationoftime v1 v2

  4. SpecialTopics 3.61 • Definition • MonteCarlosimulation(v1) • Stochasticallyvaryinginitialconditionsinputtodeterministicphysicsorprocessmodel. • Modeling • Physicsofsimulandmodeledusingphysics • Time modeledexplicitly,as time-steppedcontinuous • Simulation • Randomlygeneratedinitialconditions… • …usedtostudyrangeof possibleresults • Usuallymultipletrialsandstatistical analysis

  5. SpecialTopics 3.62 • Definition • MonteCarlosimulation(v2) • Fixedinitialconditionsinput • tostochasticphysicsorprocessmodel. • Modeling • Physicsofsimulandmodeledusingprobability • Time modeledimplicitly,noexplicittime advance • Simulation • Randomlygeneratedphysicsoutcomes… • …usedtostudyrangeof possibleresults • Usuallymultipletrialsandstatistical analysis

  6. SpecialTopics 3.63 MonteCarlov1method(alternative) • DefiningaMonteCarlomodel • Identifya set ofrandomvariablesthatspecify theinitialcondition. • Selectprobabilitydistributionandparametersfor each. • Developdeterministicmodeltocalculateresults froma set of inputs. • ExecutingaMonteCarlosimulation • Repeatfor each ofntrials: • Randomlygeneraterandomvariate foreachinput. • Calculatetrial outcome with deterministicmodel. • Recordtrial outcome. • Statisticallyanalyzetheresults.

  7. SpecialTopics 3.64 • MonteCarlov2method(alternative) • DefiningaMonteCarlomodel • Identifya set ofinputvariablesthatspecify theinitialcondition. • Selectspecificvaluesforeach. • Developstochasticmodelbasedon probability distributionstocalculateresultsfromaset of inputs. • ExecutingaMonteCarlosimulation • Repeatfor each ofntrials: • Initializemodelwithselectedinputvalues. • Calculatetrial outcome with stochastic model. • Recordtrial outcome. • Statisticallyanalyzetheresults.

  8. SpecialTopics 3.65 MonteCarlosimulation Examples

  9. SpecialTopics 3.66 Example1(MCv1):Calculatingπ Overlayaunitcirclearcoverasquarearea. Choosearandomxandy,andplaceadotthere.Repeatthisstepseveraltimes. Calculateπbaseduponthisresult(seenext slide) 1 1 0

  10. SpecialTopics 3.67 • Assessingsimulationoutput • Wanttoapproximate“real”valueofπ 1 2 r 4 #dotsinsidecircle  #dotsinsideentiresquare rr 4   Example:π/4≈340/500 1 • Simulatedπ ≈2.72 • Error of12.1% ? • Canrerunwithmoresamplestogeneratemoreaccurateoutput 1 0

  11. SpecialTopics 3.68 Experimentalresultsfromimplementation Demo

  12. SpecialTopics 3.69 Example2(MCv1):Productearnings • Wanttopredictproductearninginfutureyears • Historicaldataforlast fiveyearsavailable • Candevelopaprobabilitydistribution • Choosetriangulardistributionwhengivensmall amountsof data • Needminimum,maximum,andmode (mostlikely) • Usethefollowingrelation: • earnings=unit pricexunitsales–(variablecosts +fixedcosts)?

  13. SpecialTopics 3.70 Determiningminimum,likely,andmaximum Historicaldataperyearand“transformed”data: •Minimums •Averages •Best guesses

  14. SpecialTopics 3.71 Formingtriangulardistribution 0.1 Probability 2(xa)  axc (ba)(ca)  2(bx) f(x) (ba)(bc) cxb otherwise  0  0  50 (a) 55 (c) 60 Unitprice 70 (b)

  15. SpecialTopics 3.72 MATLABcode h= sqrt(rand(1,10000)); unit_price= (70-50)*h.*rand(1,10000)+55-(55-50)*h variable_costs= (65000- 5000)*h.*rand(1,10000)+55200-(55200-50000)*h; fixed_costs= (20000-10000)*h.*rand(1,10000)+14000- (14000-10000)*h; unit_sales= (3000-2000)*h.*rand(1,10000)+2440- (2440-2000)*h; for i=1:10000 earnings(i)= unit_price(i)*unit_sales(i)- (variable_costs(i)+fixed_costs(i)) end

  16. SpecialTopics 3.73 Earningssummarystatistics 400 300 Frequency 200 100 0 2 4 6 8 10 12 14 16 x104 Compare Earnings

  17. SpecialTopics 3.74 • Example3(MCv1):Missileimpacts[Zhang,2008] • Application • Deterministic6DOFmodelofmissiletrajectory • Usedtocalculateimpact pointgiveninitialconditions • Measure xandyerrorw.r.t.aimingpoint • Comparemodelandlivetestxand yerrorvariances • Two ranges: 60Km and 100Km • 6livetests,800MonteCarlomodeltrials eachrange • MonteCarloanalysis • For eachtrial, generatetrajectoryinitial conditionsfrom probabilitydistributions • Calculateimpact point • Repeatfor800trials • Comparevariances

  18. SpecialTopics 3.75 • Missiletrajectorymodel • Physicsbased • Organizedintomodules:velocity,rotation, atmosphericconditions, aerodynamics,thrust • ImplementedinMATLABSimulink mdVPcoscosXmgsin dt mVp(sincosvcossinsinv)YcosvZsinvmgcos dt Velocitymodule equations d • mVcosdvP(sinsincossinsin)YsinZcos v v v v dt Velocitymodule blockdiagram

  19. SpecialTopics 3.76 Impactdata 60Km 100Km

  20. SpecialTopics 3.77 MonteCarlosimulation Casestudy: Bombingaccuracy analysis(MCv2)

  21. SpecialTopics 3.78 • Bombingaccuracyanalysis • Bomberattackonammunitiondepot • Conventional(unguided)bombs • Impactsrandomlydispersedw.r.t aimingpoint, inbothx(range)andy(azimuth)directions • Impactwithinammunitiondumpperimeterishit

  22. SpecialTopics 3.79 Ammunitiondump,1996[Banks, 1996] 1 (-504,198) y 2 (552, 18) 950m –x x Aimingpoint (0, 0) –y 1250m

  23. SpecialTopics 3.80 Ammunitiondump,2010[Banks, 2010]

  24. SpecialTopics 3.81 • Hitsandmisses • Configuration • Bomb aimingpointis coordinateorigin(0, 0) • Bombersapproachfromwest(left) • Each bombercarries 10 bombs • Stochasticbombimpactmodel • Each impactassumedindependentof others • Normallydistributedaroundaimingpoint • Aimingpoint(0,0)is xmean,ymean x= 0,y= 0 • xstandard deviationx=400 • ystandard deviationy=200

  25. SpecialTopics 3.82 • Normallydistributedrandomvariates • Randomvariate (rv) • Specific numberfromagivendistribution • Randomlygenerated • Normalrandomvariates • Normaldistribution:meanμandstddevσ • Standardnormaldistribution:mean0andstddev1 • NormalrvXfromstandardnormalrvZ:X=μ+Zσ • Spreadsheet:=E4+E5*NORMSINV(RAND()) Givenbombimpact coordinatesXandY normallydistributedperμx,σx andμy,σy, equationsforstdnormalr.v.Zx andZyare Given standardnormalr.v.Zx andZy, solveequations forXandY togetbombimpact coordinates Xy Z  Xx X 400Z Y200Z Z x y x y xy μx = 0, σx =400 μy = 0, σy =200

  26. SpecialTopics 3.83 • Procedureforeachtrial • Generate standard normalrandomvariatesZx,Zy • CalculateimpactcoordinatesX,YfromZx,Zyusingmodel • Determineif impactpoint(X,Y)is withinammo dump

  27. SpecialTopics 3.84 Simulatedbombingruns[Banks, 2010]

  28. SpecialTopics 3.85 Experimentresults[Banks, 2010] Sample400trialexperimentresults. Each trial10bombs. Frequencyofnumberofbombhitsinatrial.

  29. SpecialTopics 3.86 MonteCarlosimulation Computingconfidenceintervals [Brase,2009][Petty,2012][Petty,2013]

  30. SpecialTopics 3.87 Exampleconfidenceinterval ... • 12.06 12.03 12.05 12.02 12.10 • Sampleofcerealboxesfilledbymachine 12.04 • Samplesize=100boxes • Mean weightofsample=12.05ounces • Standarddeviationof weightofsample= 0.1ounces • Confidenceintervalformeanweight • ▪ Interval[12.0304,12.0696] • Confidencelevel0.95(95%)

More Related