Simulation - Computational Methods - Lecture Slides, Slides of Calculus for Engineers

These are the Lecture Slides of Computational Methods which includes Thévenin’s Equivalent Circuit, Circuit Simplification, Analysis of Power Transfer, Voltage Division, Analytical Game Plan, Array Operation, Element Operations, Number of Allowable Values etc.Key important points are: Simulation, Random Processes, Statistically Independent Numbers, Random Number Generator, Middle Square Method, Algorithmic Operation, Purpose of Developing, Testing Engineered Systems, Simulation Techniques

Typology: Slides

2012/2013

Uploaded on 03/26/2013

abduu
abduu 🇮🇳

4.4

(49)

195 documents

1 / 37

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Engr/Math/Physics 25
Chp7
Statistics-2
Docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25

Partial preview of the text

Download Simulation - Computational Methods - Lecture Slides and more Slides Calculus for Engineers in PDF only on Docsity!

Learning Goals

  • Create HISTOGRAM Plots
  • Use MATLAB to solve Problems in
    • Statistics
    • Probability
  • Use Monte Carlo (random) Methods to

Simulate Random processes

  • Properly Apply Interpolation to Estimate

values between or outside of know data

points

Random Number Generator

  • von Neumann (ca. 1946) Developed the

Middle Square Method

  • take the square of the previous number and

extract the middle digits

  • example: four-digit numbers
    • r
i
  • r
i +

= 3763 ( r

i
  • r
i +

= 1601 ( r

i +
  • r
i +

= 6320 ( r

i +

PSUEDO-Random Number

  • Most Computer Based Random Number

Generators are Actually PSUEDO-Random

in implementation

  • Note that for the von Nueman Method
    • Each number is COMPLETELY determined
by its predecessor
  • The sequence is NOT random but appears to be so
statistically → pseudo-random numbers
  • All random number generators based on an

algorithmic operation have their own built-in

characteristics

  • MATLAB uses a 35 Element “seed”

Some (psuedo)Random No.s

  • Engr/Math/Physics
    • Chp
  • Statistics-
    • 0.30253 0.35572 0.8678 0.065315 0.98548 0.62339 0.50921 0.
    • 0.85184 0.049047 0.37218 0.2343 0.017363 0.68589 0.07429 0.
    • 0.75948 0.75534 0.07369 0.9331 0.81939 0.67735 0.19324 0.
    • 0.94976 0.89481 0.19984 0.063128 0.62114 0.87683 0.3796 0.
    • 0.55794 0.28615 0.049493 0.26422 0.56022 0.012891 0.27643 0.
  • 0.014233 0.2512 0.56671 0.99953 0.24403 0.3104 0.77088 0.
    • 0.59618 0.93274 0.12192 0.21199 0.82201 0.77908 0.31393 0.
    • 0.81621 0.13098 0.52211 0.49841 0.26321 0.3073 0.63819 0.
    • 0.97709 0.94082 0.11706 0.29049 0.75363 0.92668 0.98657 0.
    • 0.22191 0.70185 0.76992 0.67275 0.65964 0.67872 0.50288 0.
    • 0.70368 0.84768 0.37506 0.95799 0.21406 0.074321 0.9477 0.
    • 0.52206 0.20927 0.82339 0.76655 0.60212 0.070669 0.82803 0.
      • 0.9329 0.45509 0.046636 0.66612 0.60494 0.01193 0.91756 0.
    • 0.71335 0.081074 0.59791 0.13094 0.6595 0.22715 0.11308 0.
    • 0.22804 0.85112 0.94915 0.095413 0.18336 0.51625 0.81213 0.
    • 0.44964 0.56205 0.2888 0.014864 0.63655 0.4582 0.90826 0.
      • 0.1722 0.3193 0.88883 0.28819 0.17031 0.7032 0.15638 0.
    • 0.96882 0.3749 0.10159 0.81673 0.5396 0.58248 0.12212 0.

Random No. Simulation

  • Started During WWII for the

purpose of Developing

InExpensive methods for

testing engineered systems by

IMITATING their Real Behavior

  • These Methods are Usually

called MONTE CARLO

Simulation Techniques

Monte Carlo (2)

  • Analytical Tools are Used to ensure that the

Random assignment of Input Parameter Values

meet the Desired Probability Distribution Function

  • The Result of MANY Random Trials Yields a

Statistically Valid Set of Predictions

  • Then Use standard Stat Tools to Analyze Result to

Pick the “Best” Overall Value

  • e.g.: Mean, Median, Mode, Max, Min, etc.

Monte Carlo Process Steps

1. Define the System

2. Generate (psuedo)Random No.s

3. Generate Random VARIABLES

  • Usually Involves SCALING and/or OFFSETTING

the RNs

4. Evaluate the Model N-Times; each time

using Different Random Vars

5. Statistical Analysis of the N-trial Results to

assess Validity & Values

Fixed Model Architecture

  • The Model is assumed

to be UNvarying; i.e.,

it behaves as a Math

FUNCTION

  • Example: SPICE
    • SPICE ≡ S imulation
P rogram with
I ntegrated Circuit
E mphasis (UCB)
  • SPICE has Monte Carlo

BUILT-IN

  • SPICE uses
    • UNchanging Physical
Laws  KVL & KCL
  • IDEAL Circuit Elements
 I/V Sources, R, C, L

Component VALUES for R, L, C, Vs, and Q can Vary Randomly

Monte Carlo Summarized

  • Monte Carlo Method : Probabilistic

simulation technique used when a

process has a random component

1. Identify a

Probability Distribution

Function (PDF)

2. Setup intervals of

random numbers to

match probability distribution

3. Obtain the random numbers

4. Interpret the results

Scaling rand

  • rand covers the

interval [0,1] – To cover

[a,b] SCALE & OFFSET

the Random No.

  • Let x be a random No.
over [0,1], then
a random number
y over [a,b]

y = ( ba ) x + a

>> y =(37-19)*rand + 19

 Example: Use rand

to Produce

Uniformly Dist

Random No over

[19,37]

*>> y =(37-19)rand + 19 y =

y =(37-19)rand + 19 y = 23.*

  • Example Result

Scaled & Offset Random No.s

33.0445 28.8462 30.5977 24.5998 20.5393 19.6793 19.5497 20. 26.0153 24.3338 25.8150 35.6208 23.7247 34.9330 32.3933 31. 23.3504 32.4045 33.6084 26.7437 33.4183 35.4392 28.0004 19. 26.2704 22.4012 28.5909 22.3267 19.5260 33.3313 27.6386 20. 20.7362 31.3620 25.3131 35.2879 35.7194 20.7768 35.2850 28. 21.3755 22.3032 35.9020 36.6355 32.1460 23.7137 29.9776 20. 35.9569 25.6327 34.7670 26.8997 27.7950 25.0364 30.1180 33. 36.2104 30.2611 28.9028 21.0001 29.4135 31.2351 34.4700 33. 29.3538 33.0441 30.2046 23.6452 23.2711 21.4580 33.4988 32. 20.0760 20.4603 29.5668 26.3570 27.2593 31.9821 29.3810 21. 23.2260 35.7289 22.7394 29.7081 36.3356 20.9217 22.2926 30. 25.3569 32.9628 24.4224 23.7198 28.8425 30.7676 23.3188 28. 33.7815 27.7622 27.4766 29.8512 28.3804 27.8951 34.9572 36. 19.2773 26.8455 23.1488 31.8019 23.1687 33.0229 19.5161 30. 19.7744 27.0421 34.1976 22.9914 27.8002 31.8707 27.8182 33. 22.0418 24.5143 22.5058 21.1135 30.2331 35.2670 22.0227 27. 30.6841 28.1532 23.0666 24.3402 31.2244 35.0366 36.6163 26. 32.1710 28.1939 22.0727 24.7380 26.1193 25.0149 31.8285 33. 30.6594 33.7173 23.0980 26.6350 25.6139 31.5774 28.0085 20. 27.1166 33.3070 26.8426 28.1414 36.7837 22.5606 27.4796 21.

rand1937 = (37-
19)*rand(20,8) + 19
>> Rmax
=max(max(rand1937))
Rmax =
>> Rmin =
min(min(rand1937))
Rmin =

rand vs randn – scaled and offset

  • rand 0 10 20 30 40 50 60 70 80 90 100 0 20 40 60 80 100 120 140 rand RN100 = 100rand(10000,1); hist(RN100,100), title('rand')*

 randn

*Norm100 = 100randn(10000,1)

  • 100 hist(Norm100,100), title('randn')** -300 -200 -100 0 100 200 300 400 500 0 50 100 150 200 250 300 350 randn

Monte Carlo Example (1)

  • Build a Wharehouse from PreCast Concrete

(a Tilt-Up) Per PERT Chart

  1. Project Start 2 3 4 5 6 7 1. Project End A (^) B C D E F G H

 PERT ≡ Program Evaluation and

Review Technique

  • A Scheduling Tool Developed for

the USA Space Program