TAN Activity2 Section5.1

Embed Size (px)

Citation preview

  • 8/18/2019 TAN Activity2 Section5.1

    1/16

    Name: Ceferino Kevin A. Tan Course and Year: BSECE - 4EE 179.1 Section: 4! "a#orator$ Sc%edu&e: onda$ 1'-(

    Activit$ ': at%ematica& ode&in) of *%$sica&S$stems

    Abstract+#vious&$, t%e oeration of %$sica& s$stems often invo&ve a &ot of

    non&inearit$ and unredicta#i&it$. e norma&&$ refer to t%ese uncertainties as

    nonidea&ities. /nderstandin) t%e e0ects of t%ese nonidea&ities can contri#ute

    to si)nicant imrovement in %$sica& s$stems in terms of accurac$ and

    &on)-term re&ia#i&it$.

     To create e0ective mac%ines or %$sica& s$stems, understandin) t%e %$sica&

    nonidea&ities and %o2 2e can miti)ate t%ese 2i&& $ie&d muc% more accurate

    and muc% more e3cient s$stems. e t%en create mat%ematica& mode&s of

    t%ese nonidea&ities to tae account of t%eir e0ects in our %$sica& s$stems.

    e norma&&$ tae account of t%e nonidea&ities of %$sica& s$stems into our

    ca&cu&ations #$ t%e use of t%e ordinar$ di0erentia& e5uations, 2%ic% tae

    mode&ed nonidea&ities, sa$, t%e corio&is e0ect-on a &on)-ran)e #u&&et, or t%e

    srin) constant of a nonidea& srin).

    6n t%is activit$, 2e 2i&& mae use of t%e caa#i&ities of Sci"a# to erform

    mat%ematica& oerations invo&vin) ordinar$ di0erentia& e5uations, 2%ic% 2i&&

    #e crucia& in #ui&din) e0ective contro& s$stems of %$sica& s$stems andor

    mac%iner$.

    1 Objectives

    •  To )ras t%e imortant ro&e of mat%ematica& mode&s of %$sica&

    s$stems in t%e desi)n and ana&$sis of contro& s$stems.•  To &earn %o2 Sci&a# %e&s in so&vin) suc% mode&s.

    2 List of equipment/software

    • *ersona& Comuter

    • Sci&a#

    3 Deliverables

    • Sci&a# scrits and t%eir resu&ts for a&& t%e assi)nments and e8ercises

    roer&$ discussed and e8&ained.• Ana&$tica& conc&usion for t%is &a# activit$.

  • 8/18/2019 TAN Activity2 Section5.1

    2/16

    Name: Ceferino Kevin A. Tan Course and Year: BSECE - 4EE 179.1 Section: 4! "a#orator$ Sc%edu&e: onda$ 1'-(

  • 8/18/2019 TAN Activity2 Section5.1

    3/16

    Name: Ceferino Kevin A. Tan Course and Year: BSECE - 4EE 179.1 Section: 4! "a#orator$ Sc%edu&e: onda$ 1'-(

    4 Modelin !"#sical $#stems

    4%1 Mass&$prin $#stem Model

    Consider t%e fo&&o2in) ass -Srin) s$stem s%o2n in i)ure 1 2%ere ' is t%e

    srin) force, f v is t%e friction coe3cient, ()t* is t%e dis&acement and f)t* is

    t%e a&ied force:

    eferrin) to t%e free-#od$ dia)ram, 2e )et

     M  d

    2 x (t )

    d t 2  +f v

    dx (t )dt 

      + Kx(t )=f  ( t )  . )1*

     T%e second order &inear di0erentia& e5uation ;1< descri#es t%e re&ations%i

    #et2een t%e dis&acement and t%e a&ied force. T%e di0erentia& e5uation

    can t%en #e used to stud$ t%e time #e%avior of ()t* under various c%an)es

    of t%e a&ied force.

     T%e o#=ectives #e%ind mode&in) t%e mass-damer s$stem can #e man$ and

    ma$ inc&ude:

    • /nderstandin) t%e d$namics of suc% s$stem.

    +iure 1% Mass&$prin $#stem and its +ree&,od#

    Diaram

  • 8/18/2019 TAN Activity2 Section5.1

    4/16

    Name: Ceferino Kevin A. Tan Course and Year: BSECE - 4EE 179.1 Section: 4! "a#orator$ Sc%edu&e: onda$ 1'-(

    • Stud$in) t%e e0ect of eac% arameter on t%e s$stem suc% as mass M,

    t%e friction coe3cient ,, and t%e e&astic c%aracteristic '()t*.• >esi)nin) a ne2 comonent suc% as damer or srin).

    • eroducin) a ro#&em in order to su))est a so&ution.

    4%2 -sin $cilab in $olvin Ordinar# Di.erential quations

    Sci&a# can %e& so&ve &inear or non&inear ordinar$ di0erentia& e5uations ;+>E<

    usin) ode too&. To s%o2 %o2 $ou can so&ve +>E usin) Sci&a#, 2e 2i&& roceed

    in t2o 2a$s. e rst see %o2 2e can so&ve a rst order +>E and t%en see

    %o2 2e can so&ve a second order +>E.

    4% 3 +irst Order OD0 $peed ruise ontrol (ample

    Assume a ?ero srin) force 2%ic% means t%at ' . E5uation ;1< #ecomes

     M  d

    2 x ( t )

    d t 2  +f v

    dx ( t )dt   =f (t )   )2*

    or

     M  dv (t )

    dt   +f v v (t )=f  (t ) )3*

    since

    a(t )=dv (t )

    dt   =

    d2 x (t )

    d t 2  ,

    and   v (t )=dx (t )

    dt   .

    E5uation ;(< is a rst order &inear +>E and 2e can use Sci&a# to so&ve for t%is

    di0erentia& e5uation.

    e can mode& and so&ve for e5uation ;(< #$ 2ritin) t%e fo&&o2in) scrit in

    Sci&a#. You can a&so inut t%e codes direct&$ into t%e Sci&a# Conso&e.

    Code:

  • 8/18/2019 TAN Activity2 Section5.1

    5/16

    Name: Ceferino Kevin A. Tan Course and Year: BSECE - 4EE 179.1 Section: 4! "a#orator$ Sc%edu&e: onda$ 1'-(

    //declare constant values

    M = 750

    B = 30

    Fa = 300 //the force f(t)

    //differential equation definition

    function dvdt = f(t,v)

    dvdt = (Fa-B*v)/M

    endfunction

    //initial conditions ! t=0, v=0

    t0 = 0

    v0 = 0

    t = 0"0#$"5

    v = ode(v0, t0, t, f) //read references for ode tool

    clf

    %lot&d(t, v)

  • 8/18/2019 TAN Activity2 Section5.1

    6/16

    Name: Ceferino Kevin A. Tan Course and Year: BSECE - 4EE 179.1 Section: 4! "a#orator$ Sc%edu&e: onda$ 1'-(

    4% 4 $econd Order OD0 Mass&$prin $#stem (ample

    6n rea&it$, t%e srin) force andor friction force can %ave a more com&icated

    e8ression or cou&d #e reresented #$ a )ra% or data ta#&e. or instance, a

    non&inear srin) can #e desi)ned suc% t%at t%e e&astic c%aracteristic is

     K xr (t )

    2%ere r @ 1. i)ure ' is an e8am&e of a non&inear srin).

    6n suc% case, e5uation ;1<

    #ecomes

     M  d

    2 x (t )

    d t 2  +f v

    dx (t )dt 

      + K x r( t )=f  (t )   )4*

    E5uation ;(< reresents anot%er ossi#&e mode& t%at descri#es t%e d$namic

    #e%avior of t%e mass-damer s$stem under e8terna& force. /n&ie e5uation;1

  • 8/18/2019 TAN Activity2 Section5.1

    7/16

    Name: Ceferino Kevin A. Tan Course and Year: BSECE - 4EE 179.1 Section: 4! "a#orator$ Sc%edu&e: onda$ 1'-(

    "et  x (t )= X 1  , sod X 

    1

    dt   = X 

    2   anddx( t )

    dt   = X 

    2 ,

    sod X 

    2

    dt   =

    −f v M 

      X 2−

     K 

     M  X 

    1

    r+f  (t ) M   .

    6n vector form, &et  X =  X 

    1

     X 2

    =[ x x ' ]  7 dX dt  =[ d X 

    1

    dt 

    d X 2

    dt  ]=[  x '  x ' ' ]

    so 2e )et

    dX 

    dt 

     =

    [  X 

    2

    −f v M   X 2−

     K 

     M   X 1r

    +f  ( t ) M 

     ] .

     T%e Sci&a# ode too& can no2 #e used:

    'ode"

    //declare constant values

    M = 750

    B = 30

    Fa = 300 //the force f(t) = $5

    r = $

    //differential equation definition

    function %rie = f(t,)

    %rie($) = (&)

    %rie(&) = -(B/M)*(&)-(/M)*((($))+r)(Fa/M)

    endfunction

    t0 = 0

    t = 0"0#$"5

    0 = 0 //set initial %osition

    %rie0 = 0 //set initial velocit

    = ode(.0 %rie0, t0, t, f)

  • 8/18/2019 TAN Activity2 Section5.1

    8/16

    Name: Ceferino Kevin A. Tan Course and Year: BSECE - 4EE 179.1 Section: 4! "a#orator$ Sc%edu&e: onda$ 1'-(

    clf

    %lot&d(t, ($,")) // ($,")1 %lots the %osition vs tie

    // (n, ")1 to %lot a solution in atri

    for

    // 2ith diension n

  • 8/18/2019 TAN Activity2 Section5.1

    9/16

    Name: Ceferino Kevin A. Tan Course and Year: BSECE - 4EE 179.1 Section: 4! "a#orator$ Sc%edu&e: onda$ 1'-(

    8 Assessment

    8%1 Assinment

    1. S%o2 and discuss t%e )ra%s o#tained from t%e sam&e simu&ations.

     T%e rst )ra% s%o2s

    t%e ve&ocit$-time

    re&ation of an o#=ect,

    %avin) a mass of 7!

    ), #ein) inuenced

    #$ a force of a  (N movin) at one

    direction, a&& 2%i&e

    under t%e coe3cient

    of friction of  

    ma)nitude ( Nm. T%e o#=ectDs )iven

    initia& condition is vo  ms at to  s.

    At rst )&ance, t%e function aears to#e &inear, 2%en in fact, it is not.e used t%e ode function ;ordinar$

    di0erentia& e5uation

  • 8/18/2019 TAN Activity2 Section5.1

    10/16

    Name: Ceferino Kevin A. Tan Course and Year: BSECE - 4EE 179.1 Section: 4! "a#orator$ Sc%edu&e: onda$ 1'-(

     y (t 0)= y0

     T%e second sam&e code $ie&ds t%e )ra%s%o2n to t%e ri)%t.

     T%is )ra% &ots t%e osition of an$ ointin t%e srin) 2it% resect to time.

    Notice t%at t%e rate #$ 2%ic% t%e ositionc%an)es over time increases, %ence t%e

    u2ard ara#o&ic c%aracteristic of t%e)ra%.

    $creens"ots

    $ample code 1

  • 8/18/2019 TAN Activity2 Section5.1

    11/16

    Name: Ceferino Kevin A. Tan Course and Year: BSECE - 4EE 179.1 Section: 4! "a#orator$ Sc%edu&e: onda$ 1'-(

    $ample code 2

  • 8/18/2019 TAN Activity2 Section5.1

    12/16!osition vs% 9ime

    Name: Ceferino Kevin A. Tan Course and Year: BSECE - 4EE 179.1 Section: 4! "a#orator$ Sc%edu&e: onda$ 1'-(

    8%2 (ercise 1

    eferrin) to t%e mass-srin) s$stem e8am&e:

    1. *&ot t%e osition and t%e seed of t%e s$stem #ot% 2it% resect to time

    in searate )ra%s.

    :rap" of position vs time

    :rap" of velocit# vs time

    '. C%an)e t%e va&ue of r to ' and (. *&ot t%e osition and seed #ot% 2it%

    resect to time. >iscuss t%e resu&ts.

    ;"en r2

  • 8/18/2019 TAN Activity2 Section5.1

    13/16

  • 8/18/2019 TAN Activity2 Section5.1

    14/16

    Name: Ceferino Kevin A. Tan Course and Year: BSECE - 4EE 179.1 Section: 4! "a#orator$ Sc%edu&e: onda$ 1'-(

    (. it% r  1, var$ t%e va&ue of '  ;mu&ti&$ #$ ! and 1< and discuss t%e

    resu&ts.;it" ' >8

    ;it" ' 18

    A "i"er sprin constant will result in a ?bouncier@ sprin% 9"at is a

    "i"er sprin constant results in an increased frequenc# of

    oscillation of t"e sprin over a period of time% =t is also noticeable

    t"at t"e rane of motion "as decreased for increasin values of t"e

    sprin constant '%

  • 8/18/2019 TAN Activity2 Section5.1

    15/16

    Name: Ceferino Kevin A. Tan Course and Year: BSECE - 4EE 179.1 Section: 4! "a#orator$ Sc%edu&e: onda$ 1'-(

    8%3 (ercise 2

    Consider t%e mec%anica& s$stem deicted in t%e )ure.

     T%e inut is )iven #$ f(t), and t%e outut is

    )iven #$  y(t). >etermine t%e di0erentia&

    e5uation )overnin) t%e s$stem and usin) Sci&a#,

    2rite a scrit and &ot t%e s$stem resonse suc%

    t%at forcin) function f(t) = 1. "et m = 10, k = 1, and b

    = 0.5. 

    a. T%e ea dis&acement of t%e #&oc is a#out .#. At time t , t%e outut reac%es ea dis&acement.c. 6f k = 10, t%e ea va&ue of $ is .d. %at %aens to t%e s$stem 2%en b is c%an)edF

  • 8/18/2019 TAN Activity2 Section5.1

    16/16

    Name: Ceferino Kevin A. Tan Course and Year: BSECE - 4EE 179.1 Section: 4! "a#orator$ Sc%edu&e: onda$ 1'-(

    B Ceferences

    C6SE (' "inear Contro& S$stems "a#orator$ anua&. ;'11, +cto#ereartment, Kin) a%d /niversit$ of *etro&eum Ginera&s.

    Sci&a# Enterrises . ;'1(