damped harmonicoscillator

Upload: afaq-ahmed-abbasi

Post on 09-Apr-2018

240 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/7/2019 Damped harmonicoscillator

    1/13

    ISLAMABAD

    Examine the Damped Oscillation of spring mass system using webcam & Matlab.

    OBJECT:

    Examine the amplitude of freely oscillating and under

    damped harmonic oscillator of a spring mass system by

    using Webcam & Mat lab.

  • 8/7/2019 Damped harmonicoscillator

    2/13

    ISLAMABAD

    Examine the Damped Oscillation of spring mass system using webcam & Matlab.

    APPARATUS:

    The apparatus used in this experiment was:

    y Stand

    y Spring mass system

    y Set of masses

    y Webcam

    y Beaker

    y PC

    y Matlab

    Stand Spring Mass

    Set of masses Beaker

  • 8/7/2019 Damped harmonicoscillator

    3/13

    ISLAMABAD

    Examine the Damped Oscillation of spring mass system using webcam & Matlab.

    PC Webcam

    Matlab

  • 8/7/2019 Damped harmonicoscillator

    4/13

    ISLAMABAD

    Examine the Damped Oscillation of spring mass system using webcam & Matlab.

    APPARATUS SETUP:

    The schematic diagram of the apparatus setup is shown in this figure,

  • 8/7/2019 Damped harmonicoscillator

    5/13

    ISLAMABAD

    Examine the Damped Oscillation of spring mass system using webcam & Matlab.

    THEORY:

    Vibratory Motion:

    To and fro motion of a body about its mean position is known as vibratory motion.

    Restoring Force:

    The force that brings or tends to bring the oscillatory body toward its mean positionis known as restoring force.

    Fr is the Restoring force in this figure. It bring body back to it mean position orequilibrium position.

  • 8/7/2019 Damped harmonicoscillator

    6/13

    ISLAMABAD

    Examine the Damped Oscillation of spring mass system using webcam & Matlab.

    Characteristics ofharmonic oscillator:

    y Vibration:

    One Complete round trip is known as vibration.

    This figure is showing one vibration. As the body move from it position, completesone complete trip mean its one vibration.

    y Time period:

    Time requires to complete one vibration is known as Time period. And is given by

    formula.

    T=

    T= 2

    These equations demonstrate that period and frequency are independent of amplitude & the

    initial phase of motion.

  • 8/7/2019 Damped harmonicoscillator

    7/13

    ISLAMABAD

    Examine the Damped Oscillation of spring mass system using webcam & Matlab.

    y Frequency:

    Frequency is the number of occurrences of a repeating event per unit time.

    = 2f

    f =

    (5)

    Inserting values of in equation (5)

    f =

    It will give us the frequency of body having vibratory motion.

    Simpleharmonic motion:

    It is defined as:

    The acceleration causes the motion of a particle or object is directly proportional and inopposition to its displacement from its equilibrium position

    Mathematically

    a(t) x(t)

    a(t) = kx(t)

    Where,

    a= acceleration; x= displacement (amplitude); k= constant of proportionality

    Now consider the x-component of motion with time:

  • 8/7/2019 Damped harmonicoscillator

    8/13

    ISLAMABAD

    Examine the Damped Oscillation of spring mass system using webcam & Matlab.

    X (t)=x0 cos (t + ) (1)

    Where,

    t= time; =phase

    The velocity and acceleration as a function of time can be found as:

    Differentiating equation (1) w.r.t t(Time)

    v(t) =

    V(t)= -x0 sin (t + )

    -ive sign shows the direction of velocity, it says that direction of Velocity will beopposite that of displacement.

    Now,

    a(t) = (

    ) =

    = - 2x0 cos (t + )

    x(t)= x0 cos (t + )

    Therefore,

    a (t) = - 2x(t)

    The above equation describes SHM.

    Conditions for a body to show SHM are:

    y System should have restoring force.y System should possess inertia.

  • 8/7/2019 Damped harmonicoscillator

    9/13

    ISLAMABAD

    Examine the Damped Oscillation of spring mass system using webcam & Matlab.

    PROCEDURE:

    Pull the mass down by about by few centimeters in water and then

    release it so that it start moving in w ater. W e will watch this and catch this

    proceeding with help of webcam. And then study the behavior using

    MA TLAB . W e will use the following Com man ds.

    (In the script, Mat lab commands are preceded with the symbol >>.)

    y STEP 1 :

    >> W ebcam

    The command above act ivates a l ive video preview window and we can

    see the ma ss osci llating on our comp uter screen. Re adjust the app aratus

    to obtain a vertically oscillating m ass o n the co mp uter screen.

    y STEP 2:

    In order to acquire frame s, we need to type

    >> start(vid);

    This wil l acquire 300 frames. Observe the parameters updating

    themselves in the bottom of the video preview window.

    y STEP 3:

    In order to store these frame s in the me mory, we need to type

    >> savedata

    This wi l l create two arrays named frames and t ime and store the acquired

  • 8/7/2019 Damped harmonicoscillator

    10/13

    ISLAMABAD

    Examine the Damped Oscillation of spring mass system using webcam & Matlab.

    frame s and their t ime stamp ed values.

    y STEP 4:

    >> size(frames)

    y STEP 5:

    The f irst frame can be viewed by typing the comm and

    >> firstframe= frame s(: , : , : , 1)

    >> Im view(firstframe );

    y STEP 6:

    Next we need to crop the acquired frames so that the irrelevant

    information is f i l tered out. Mat lab has a built- in command known as

    imcrop which crops an image to a specified rectangle. W e can crop the

    first fram e b y typing

    >> rect=[xm in y min (xmax- xm in) (ym ax-y min) ]

    y STEP 7:

    In order to crop the defined rect we will use the following com ma nd

    >> cropregion= im crop(firstfram e,rect);

    y STEP 8:

    In order to crop all the 30 0 frame s in one g o we wil l use a for loop

    for i= 1:300

  • 8/7/2019 Damped harmonicoscillator

    11/13

    ISLAMABAD

    Examine the Damped Oscillation of spring mass system using webcam & Matlab.

    region s(:,:,:,i)= imcrop (frame s(:,:,:,i), rect);

    end

    Ma t lab saves this cropped array with the na me regions.

    y STEP 9:

    >> imageprocess

    Will process all the cropped images in regions and wil l calculate the

    center of ma ss of the oscillating m ass.

    y STEP 10:

    In order to ca lculate the displaceme nt coordinates for the center of ma ss , use the

    command

    >> masscenter

    y STEP 11

    The x and y coordinates of the center of mass through the 300 frames

    can be viewed by typing

    >> x= center(:,1)

    >> y= center(:,2)

    y STEP 12

    Now the time can be defined by

    >> t ime= t ime (1:300);

  • 8/7/2019 Damped harmonicoscillator

    12/13

    ISLAMABAD

    Examine the Damped Oscillation of spring mass system using webcam & Matlab.

    y STEP 13

    For plotting of graph of x coordinates against t ime we wil l use the

    following comma nd

    >> figure; plot(time,x);

    Similarly for y coordinates

    >> Figure; plot(time,y);

    Ou r graph plot against t ime and Am plitude x is ;

    4 6 8 10 12 14 1688

    88.5

    89

    89.5

    90

    90.5

    91

    91.5

    92

    92.5

    T ime " t "

    Am

    plitude

    "x"

    Damp ing

  • 8/7/2019 Damped harmonicoscillator

    13/13

    ISLAMABAD

    Examine the Damped Oscillation of spring mass system using webcam & Matlab.