S232953 Mark Cruickshank Prac 2 MDOF ENG432.pdf.pdf

25
Mark Cruickshank S232953 Charles Darwin University ENG432 Dynamics of Engineering – Prac2: Three Degree of Freedom Systems School of Engineering and Information Technology ASSESSMENT COVER SHEET Student Name Mark Cruickshank Student ID S232953 Assessment Title Lab2 – Three degree’s of freedom systems Unit Number and Title ENG432 – Dynamics of Engineering Systems Lecturer/Tutor John Motagner Date Submitted 10/5/2015 Date Received Office use only KEEP A COPY Please be sure to make a copy of your work. If you have submitted assessment work electronically make sure you have a backup copy. PLAGIARISM Plagiarism is the presentation of the work of another without acknowledgement. Students may use a limited amount of information and ideas expressed by others but this use must be identified by appropriate referencing. CONSEQUENCES OF PLAGIARISM Plagiarism is misconduct as defined under the Student Conduct By-Laws. The penalties associated with plagiarism are designed to impose sanctions on offenders that reflect the seriousness of the University’s commitment to academic integrity. * By submitting this assignment and cover sheet electronically, in whatever form you are deemed to have made the declaration set out above. I declare that all material in this assessment is my own work except where there is a clear acknowledgement and reference to the work of others. I have read the University’s Academic and Scientific Misconduct Policy and understand its implications.* http://www.cdu.edu.au/governance/documents/3.3academicandscientificmisconduct.doc . Signed: Mark Cruickshank .Date: 10/5/2015

Transcript of S232953 Mark Cruickshank Prac 2 MDOF ENG432.pdf.pdf

  • Mark Cruickshank S232953 Charles Darwin University ENG432 Dynamics of Engineering Prac2: Three Degree of Freedom Systems

    School of Engineering and Information Technology ASSESSMENT COVER SHEET

    Student Name Mark Cruickshank Student ID S232953 Assessment Title Lab2 Three degrees of freedom systems Unit Number and Title ENG432 Dynamics of Engineering Systems Lecturer/Tutor John Motagner Date Submitted 10/5/2015 Date Received

    Office use only KEEP A COPY Please be sure to make a copy of your work. If you have submitted assessment work electronically make sure you have a backup copy. PLAGIARISM Plagiarism is the presentation of the work of another without acknowledgement. Students may use a limited amount of information and ideas expressed by others but this use must be identified by appropriate referencing. CONSEQUENCES OF PLAGIARISM Plagiarism is misconduct as defined under the Student Conduct By-Laws. The penalties associated with plagiarism are designed to impose sanctions on offenders that reflect the seriousness of the Universitys commitment to academic integrity. * By submitting this assignment and cover sheet electronically, in whatever form you are deemed to have made the declaration set out above.

    I declare that all material in this assessment is my own work except where there is a clear acknowledgement and reference to the work of others. I have read the Universitys Academic and Scientific Misconduct Policy and understand its implications.* http://www.cdu.edu.au/governance/documents/3.3academicandscientificmisconduct.doc. Signed: Mark Cruickshank .Date: 10/5/2015

  • Mark Cruickshank S232953 Charles Darwin University ENG432 Dynamics of Engineering Prac2: Three Degree of Freedom Systems

    ENG432 Dynamics of Engineering Systems

    Prac2: 3 Degrees of Freedom Systems

    Mark Cruickshank S232953

  • Mark Cruickshank S232953 Charles Darwin University ENG432 Dynamics of Engineering Prac2: Three Degree of Freedom Systems

    !

    Table!of!Contents!

    1.!Objective.............................................................................................................................. 4!2.!Assumptions ........................................................................................................................ 5!3.!Known!input!values.............................................................................................................. 5!Table!3.1!!Known!input!values ............................................................................................................................................ 6!4.!Determining!the!spring!stiffness........................................................................................... 6!4.1!Spring!stiffness!!Method!1 ............................................................................................................................................. 7!

    4.1.1$Table$Spring$A ....................................................................................................................................................................7!4.1.2$Table$Spring$B ....................................................................................................................................................................7!4.1.3$Table$Spring$C.....................................................................................................................................................................7!4.1.4$Table$Spring$D ....................................................................................................................................................................7!4.1.5$Graph$Spring$A$$Weight$versus$displacement ....................................................................................................8!4.1.6!Graph!Spring!B!!Weight!versus!displacement ................................................................................................... 9!4.1.7$Graph$Spring$C$$Weight$versus$displacement ....................................................................................................9!4.1.8$Graph$Spring$D$$Weight$versus$displacement................................................................................................. 10!4.2!Spring!stiffness!!Method!2 .......................................................................................................................................... 10!4.2.1$Results$table$$Spring$A............................................................................................................................................... 10!4.2.2$Results$table$$Spring$B............................................................................................................................................... 10!4.2.3$Results$table$$Spring$C ............................................................................................................................................... 11!4.2.4$Results$table$$Spring$D............................................................................................................................................... 11!4.3!Method!1!and!Method!2!comparisons ..................................................................................................................... 11!4.3.1$Method$1$and$Method$2$comparison$table ......................................................................................................... 11!4.3.2!Variation!between!Method!1!and!Method!2 ...................................................................................................... 11!

    5.!Initial!displacements!of!the!sliders ..................................................................................... 12!5.1!Free!body!diagram ........................................................................................................................................................... 12!5.2!Equations!of!motion!for!each!Mode .......................................................................................................................... 13!5.2.1$Equation$of$motion$system$1..................................................................................................................................... 13!........................................................................................................................................................................................................... 13!5.2.4!Stiffness!&!Mass!Matrices .......................................................................................................................................... 13!5.3.1$Mass$Matrix ...................................................................................................................................................................... 13!5.3.3$Stiffness$Matrix................................................................................................................................................................ 14!5.3.5$Combining$All$Matrices ............................................................................................................................................... 14!5.4!Determining!the!initial!displacements .................................................................................................................... 14!

    6.!Determining!the!natural!frequencies!of!each!mode............................................................ 15!7.!Plot!of!each!mode!vs!time ................................................................................................. 15!7.1!Response!Mode!1 .............................................................................................................................................................. 15!7.2!Response!Mode .................................................................................................................................................................. 16!7.3!Response!Mode!3 .............................................................................................................................................................. 17!7.4!Response!all!Modes!!Subplot ..................................................................................................................................... 17!8.!Conclusion ......................................................................................................................... 18!

  • Mark Cruickshank S232953 Charles Darwin University ENG432 Dynamics of Engineering Prac2: Three Degree of Freedom Systems

    1.!Objective!

    The objective of this laboratory is to demonstrate three modes of vibrations for a three-

    degrees of freedom mass-spring system. We expect a three-degree of freedom system

    to behave differently according to the natural frequencies of each mass/node.

    To summarize we would expect three conditions for a three-degree of freedom system:

    Condition 1: At this frequency all masses move in the same direction, this would be the

    smallest frequency. This is illustrated in the below figure.

    Condition 2: At this frequency we would expect the end mass to move in the opposite

    directions as opposed to the middle and furthers end mass. The two outer masses

    should move with the same amplitude but in opposite directions if the stiffness of each

    spring is the same.

    Condition 3: At this frequency (the fastest of the other 2) the two outer masses move in

    the same direction with the same amplitude if the stiffness of each spring is the same.

    We have used a vacuum to assist in minimizing the friction between the track and the

    slider(s), thus for this laboratory we have assumed there is no friction (by using the

    vacuum). This laboratory will involve determining the following:

  • Mark Cruickshank S232953 Charles Darwin University ENG432 Dynamics of Engineering Prac2: Three Degree of Freedom Systems

    The weights of each slider(s)

    The spring-stiffness of each of the four springs

    The natural frequencies for the three individual sliders

    The initial displacement distances(s) for each of the sliders.

    We should be able to determine the initial displacement by calculating the mode ratios

    then setting initial displacements based on these calculations. Finally we can conclude

    into how accurate the experimental results are in comparison to the theoretically

    determined.

    Due to being an external student of this unit, I am unable to complete the practical

    testing associated with this laboratory, however I can conclude on how the physical

    testing would behave with respect to my results.

    2.!Assumptions! As previously mentioned, we have assumed that there is no friction between the track

    and the slider; therefore this system will have no damping. Friction has been eliminated

    due to the vacuum suction that is applied to the track.

    We also assume the following:

    All equipment measuring scales are properly calibrated, thus our measurement

    tolerances are very minimal.

    That all springs act in a linear manner.

    3.!Known!input!values! All known input values for this experiment are displayed in the below table:

    The masses of the springs and sliders have been determined by measuring these on a

    set of digital scales, we would assume an error of no more than +/- 0.001kg.

  • Mark Cruickshank S232953 Charles Darwin University ENG432 Dynamics of Engineering Prac2: Three Degree of Freedom Systems

    The lengths of the un-stretched springs have been determined visually, by using a metric

    ruler; again we would assume an error of no more than +/- 0.002M or 2mm.

    Table!3.1!!Known!input!values!No. Description

    Value Unit

    1 Mass carrier 0.0519 kg 2 Un-stretched length spring A 0.3180 M 3 Un-stretched length spring B 0.2920 M 4 Un-stretched length spring C 0.1880 M 5 Un-stretched length spring D 0.0760 M 6 Mass slider A 0.36615 Kg 7 Mass slider B 0.27480 Kg 8 Mass slider C 0.36850 Kg

    4.!Determining!the!spring!stiffness! Determining the spring stiffness for each spring was calculated using two methods.

    The first method (Method 1) involved attaching a weight to the spring and measuring the

    displacement, the results were reordered.

    The second method (Method 2) was determined by determining the period over 10

    oscillations. The following equations express how this was calculated (Palm 2009):

    T = 2

    =2T

    =k

    mobject=2T

    %

    & '

    (

    ) *

    k = 2T%

    & '

    (

    ) * 2mobject

    As we have assumed that the springs act in a linear way, we would expect the

    relationship between force and displacement to act in a linear way, provided the spring is

    within the elastic zone (Hooks Law).

  • Mark Cruickshank S232953 Charles Darwin University ENG432 Dynamics of Engineering Prac2: Three Degree of Freedom Systems

    These calculations can be seen in the attached Microsoft Excel spreadsheet.

    4.1!Spring!stiffness!!Method!1! Method 1 his was determined by using small increments of added weight and recording

    the displacement. Small increments of mass(s) were used to ensure accurate results.

    The results for each given spring are displayed in the below tables:

    4.1.1!Table!Spring!A!Spring A

    No. Mass [kg] Weight [N] Distance [m] Displacement [m] 1 0 0 0.318 0 2 0.05032 0.4936392 0.531 0.213 3 0.05542 0.5436702 0.566 0.248 4 0.06052 0.5937012 0.596 0.278 5 0.06562 0.6437322 0.628 0.31

    4.1.2!Table!Spring!B!Spring B

    No. Mass [kg] Weight [N] Distance [m] Displacement [m] 1 0 0 0.292 0 2 0.05032 0.4936392 0.541 0.249 3 0.05542 0.5436702 0.573 0.281 4 0.06052 0.5937012 0.603 0.311 5 0.06562 0.6437322 0.632 0.34

    4.1.3!Table!Spring!C!Spring C

    No. Mass [kg] Weight [N] Distance [m] Displacement [m] 1 0 0 0.188 0 2 0.05032 0.4936392 0.35 0.162 3 0.05542 0.5436702 0.368 0.18 4 0.06052 0.5937012 0.388 0.2 5 0.06562 0.6437322 0.405 0.217 6 0.07072 0.6937632 0.425 0.237 7 0.07582 0.7437942 0.443 0.255

    4.1.4!Table!Spring!D!Spring D

    No. Mass [kg] Weight [N] Distance [m] Displacement [m] 1 0 0 0.076 0 2 0.05032 0.4936392 0.15 0.074 3 0.05542 0.5436702 0.158 0.082

  • Mark Cruickshank S232953 Charles Darwin University ENG432 Dynamics of Engineering Prac2: Three Degree of Freedom Systems

    4 0.06052 0.5937012 0.165 0.089 5 0.06562 0.6437322 0.173 0.097 6 0.07072 0.6937632 0.181 0.105 7 0.07582 0.7437942 0.189 0.113

    From each of the above tables, weight was plotted against displacement in Microsoft

    Excel, a trend line was set through the origin to obtain the spring stiffness, these can be

    seen in the below graphs.

    4.1.5!Graph!Spring!A!!Weight!versus!displacement!

  • Mark Cruickshank S232953 Charles Darwin University ENG432 Dynamics of Engineering Prac2: Three Degree of Freedom Systems

    !!!

    4.1.6%Graph%Spring%B%%Weight%versus%displacement

    !

    4.1.7!Graph!Spring!C!!Weight!versus!displacement!

  • Mark Cruickshank S232953 Charles Darwin University ENG432 Dynamics of Engineering Prac2: Three Degree of Freedom Systems

    4.1.8!Graph!Spring!D!!Weight!versus!displacement!

    4.2!Spring!stiffness!!Method!2! The results for method 2 are displayed in the below tables:

    4.2.1!Results!table!!Spring!A!Spring A

    No Time [sec] Period [T] Wn [rad/sec] Mass [kg] K [N/m] 1 12.15 1.215 5.171345932 0.0502 1.342 2 12.28 1.228 5.116600413 0.0502 1.314 3 12.37 1.237 5.079373733 0.0502 1.295 Average 1.317

    4.2.2!Results!table!!Spring!B!Spring B

    No Time [sec] Period [T] Wn [rad/sec] Mass [kg] K [N/m] 1 11.75 1.175 5.347391751 0.0502 1.435 2 11.47 1.147 5.477929649 0.0502 1.506 3 11.69 1.169 5.374837731 0.0502 1.450 Average 1.464

  • Mark Cruickshank S232953 Charles Darwin University ENG432 Dynamics of Engineering Prac2: Three Degree of Freedom Systems

    4.2.3!Results!table!!Spring!C!Spring C

    No Time [sec] Period [T] Wn [rad/sec] Mass [kg] K [N/m] 1 9 0.9 6.981317008 0.0502 2.447 2 8.96 0.896 7.012483602 0.0502 2.469 3 8.88 0.888 7.07565913 0.0502 2.513 Average 2.476

    4.2.4!Results!table!!Spring!D!Spring D

    No Time [sec] Period [T] Wn [rad/sec] Mass [kg] K [N/m] 1 8 0.8 7.853981634 0.1002 6.181 2 7.78 0.778 8.07607366 0.1002 6.535 3 7.87 0.787 7.983717036 0.1002 6.387

    Average 6.368

    4.3!Method!1!and!Method!2!comparisons! As seen in the below table, the results for both methods are displayed, as we can see all

    of the springs for both methods showed a linear relationship between force and

    displacement.

    We can see that Method 1 (determined by measuring the deflection per given weight)

    appears to have a larger magnitude then that of method 2. The last column is the

    absolute difference between both methods. Whilst conducting Method 2, we found that

    determining the exact place where the oscillation peaks/finishes and the timing between

    these periods considerably hard to maintain, thus we would assume this difference in

    results is a related to this.

    4.3.1!Method!1!and!Method!2!comparison!table!

    Spring Stiffness Comparison: Method 1 and Method 2

    Spring type

    Result - Method 1 [N/m]

    Result - Method 2 [N/m]

    Abbs difference [N/m]

    A 1.9225 1.317 0.6052 B 1.9225 1.464 0.4585 C 2.9609 2.476 0.4847 D 6.6253 6.368 0.2577

    4.3.2!Variation!between!Method!1!and!Method!2!

  • Mark Cruickshank S232953 Charles Darwin University ENG432 Dynamics of Engineering Prac2: Three Degree of Freedom Systems

    Firstly, both these experiments were conducted based on human judgment, thus we can

    illustrate that due to human judgment there would be a discrepancy with results. Also

    due to the age of the springs, there are some springs that are deformed IE have been

    loaded with weight or possibly stretched past their elastic limit, that may have also

    contributed between any discrepancies in results. These deformations are displayed in

    the below photo:

    !4.3.2a!Photo!of!the!springs!used!

    The above photo is springs D to A, with spring D being the springs to the top of the

    photo.

    5.!Initial!displacements!of!the!sliders!

    5.1!Free!body!diagram! A free body diagram of the system can be seen in the below figure:

  • Mark Cruickshank S232953 Charles Darwin University ENG432 Dynamics of Engineering Prac2: Three Degree of Freedom Systems

    5.2!Equations!of!motion!for!each!Mode! From the above free body diagram, we can represent the system by using Newtons

    second law of motion, as per the following equations:

    5.2.1!Equation!of!motion!system!1!

    m1 x 1 = k2 x2 x1( ) k1x1 m1 x 1 = (k1 + k2)x1 + k2x2 m1 x 1 + (k1 + k2)x1 k2x2 = 0

    !

    m2 x 2 = k2 x2 x1( ) + k3(x3 x2)m2 x 2 + k2 x2 x1( ) k3(x3 x2) = 0 m2 x 2 k1x1 + (k2 + k2)x2 k3x3 = 0

    !

    m3 x 3 = k4 x3 k3(x3 x2)m3 x 3 + k4 x3 + k3(x3 x2) = 0 m3 x 3 + k3x2 + (k3 + k4 )x2 = 0

    5.2.4!Stiffness!&!Mass!Matrices! From the above three equation the following matrices can be found to form the below

    equation:

    M[ ] ! x + k[ ] ! x = 0

    5.3.1!Mass!Matrix!

  • Mark Cruickshank S232953 Charles Darwin University ENG432 Dynamics of Engineering Prac2: Three Degree of Freedom Systems

    m1 0 00 m2 00 0 m3

    "

    #

    $ $ $

    %

    &

    ' ' '

    !

    5.3.3!Stiffness!Matrix!

    k1 + k2 k2 0k2 k2 + k3 k30 k3 k3 + k4

    #

    $

    % % %

    &

    '

    ( ( (

    5.3.5!Combining!All!Matrices!

    m1 0 00 m2 00 0 m3

    "

    #

    $ $ $

    %

    &

    ' ' '

    x 1 x 2 x 3

    "

    #

    $ $ $

    %

    &

    ' ' ' =

    k1 + k2 k2 0k2 k2 + k3 k30 k3 k3 + k4

    #

    $

    % % %

    &

    '

    ( ( (

    x`x2x3

    "

    #

    $ $ $

    %

    &

    ' ' '

    5.4!Determining!the!initial!displacements!

    We have used the attached Matlab file to determine the mode ratios for each of the three

    modes. The initial displacements are based on these ratios. For each mass per given

    mode the initial displacement can be seen in the below table in meters.

    No. Mass no. Displacement [m] Mode Ratios from

    Matlab

    MODE 1 1 Mass A 0.05 1

    2 Mass B 0.045185 0.9037

    3 Mass C 0.017925 0.3585 MODE 2

    1 Mass A -0.042025 -0.8405

    2 Mass B 0.04351 0.8702

    3 Mass C 0.034695 0.6939

    MODE 3

    1 Mass A 0.02077 0.2077

    2 Mass B -0.08737 -0.8737

    3 Mass C 0.10671 1.0671

  • Mark Cruickshank S232953 Charles Darwin University ENG432 Dynamics of Engineering Prac2: Three Degree of Freedom Systems

    The negative values indicate that the mass is moved in the opposite direction. The last

    column of the above table is the mode ratio. This has been multiplied by the same

    number to form the initial displacement per each mode.

    6.!Determining!the!natural!frequencies!of!each!mode! The natural frequencies for each mode has been calculated using Matlab, please refer to

    the back of this report for the Matlab program

    The natural frequencies for all three masses can be seen in the below table.

    Mass item no. Natural frequency

    Mass A 2.4555 rad/sec

    Mass B 2.4496 rad/sec

    Mass C 6.560 rad/sec

    7.!Plot!of!each!mode!vs!time! Each of the three modes response in the time domain was plotted against time, these

    can be seen in the below diagrams.

    !

    !

    !

    !

    !

    !

    !

    !

    7.1!Response!Mode!1!

  • Mark Cruickshank S232953 Charles Darwin University ENG432 Dynamics of Engineering Prac2: Three Degree of Freedom Systems

    7.2!Response!Mode!!

  • Mark Cruickshank S232953 Charles Darwin University ENG432 Dynamics of Engineering Prac2: Three Degree of Freedom Systems

    7.3!Response!Mode!3!

    !

    !

    !

    7.4!Response!all!Modes!!Subplot!

  • Mark Cruickshank S232953 Charles Darwin University ENG432 Dynamics of Engineering Prac2: Three Degree of Freedom Systems

    All three response have been put into the above sub-plot, to illustrate how the behavior

    of the system changed as the initial displacement changed increased and/or

    decreased.

    8.!Conclusion! The spring rates from Method 1 were chosen due to the lower level of error whilst

    measuring. As previously stated, being an external student for this unit, the as calculated

    initial distances of all three modes has not been physically tested, thus we can only

    assume that these results would be within the range as expected. We would expect to

    see some small amount of error due to the surface having a minimal amount of friction;

    therefore I would assume the system would have a small amount of damping as a result.

    The responses of the modes appear to behave as expected, although we have not

    physically tested these results we can see at the lowest frequency the masses move in

    the same direction, this mode also appear to have small amount of phase shift and even

    amplitudes. The amplitudes are not of the same magnitude due to the springs having

    different stiffness values; the last spring that attaches to mass 3 has the highest stiffness

    value, approximately 2.5 times the stiffness of springs that attach to mass 1 and 2. The

    response of mode 2 appeared to have the most accurate period, with minimal phase

    shift.

    As demonstrated, in this part of the experiment and from a design perspective, we can

    see how the natural frequency of the systems components, the stiffness of the springs

    and the initial displacements of the masses can have an affect on multiple degrees of

    freedom systems behavior. The results would have looked quite different if the springs

    were placed into different positions IE changing spring D with spring B.

  • 10/05/2015 7:14 pmENG432_WS6c

    Page 1 of 7file:///Volumes/MARK%20USB/html/ENG432_WS6c.html

    Contents

    Known inputs

    Matrics

    Test K matrix for determininant.

    Eigenvalue formation

    Mode coordintates to physical coordinates

    The below are for the three cases:

    The below values will determine the displacment offsets %% note these are only ratios!!:

    Printing values to the screen

    Setting dx/dt matrices

    Time vecotor

    Create unit vectors for x01, x02 and x03

    Solving for the ODE's

    Plotting the vectors

    Plotting the Responses for all modes into a subplot

    close all; clear all; clc

    Known inputs

    % Stiffness input values [N/m]:k1 = 1.9225; % this is spring Ak2 = 1.9225; % this is spring Bk3 = 2.9609; % this is spring Ck4 = 6.6253; % this is spring D

    % Mass input values for the sliders [kg]m1 = 0.36615; % this is mass Am2 = 0.27480; % this is mass Bm3 = 0.36850; % this is mass C

    Matrics

    K = [k1+k2 -k2 0;-k2 k2+k3 -k3;0 -k3 k3+k4]; % This is the stiffness matrix

    M = [m1 0 0; 0 m2 0;0 0 m3]; % This is the mass matrix

    Test K matrix for determininant.

    % If det = 0, [K] does not have an inverse.

    detK = det(K);

    % This has a determinant thus we can proceed with Eigenvalue formation:

  • 10/05/2015 7:14 pmENG432_WS6c

    Page 2 of 7file:///Volumes/MARK%20USB/html/ENG432_WS6c.html

    Eigenvalue formation

    [P,Lambda] = eig(inv(M)*K); % This is the eigen vector

    omega = sqrt(Lambda)*[1 1 1]'; %This is the natural frequency for each given slider

    P=P./(P(1,:):P(1,:):P(1,:)); % This is the mode matrice

    Mode coordintates to physical coordinates

    The below are for the three cases:

    ro1 = [1 0 0]'; % Assuming mode 1 equals one and remianing modes (2&3) are equal to zeroro2 = [0 1 0]'; % Assuming mode 2 equals one and remianing modes (1&3) are equal to zeroro3 = [0 0 1]'; % Assuming mode 3 equals one and remianing modes (1&2) are equal to zero

    The below values will determine the displacment offsets %% note these are only ratios!!:

    Xo1 = P*ro1; % This will give the physical coordinates - MODE 1Xo2 = P*ro2; % This will give the physical coordinates - MODE 2Xo3 = P*ro3; % This will give the physical coordinates - MODE 3

    Printing values to the screen

    Lambda % Print on screenomega % Print on screenP % Print on screenXo1 % Print on screenXo2 % Print on screenXo3 % Print on screenK % Print on screendetK % Print on screen

    Lambda =

    5.7560 0 0 0 15.9370 0 0 0 32.5930

    omega =

    2.3992 3.9921 5.7090

    P =

    1.0000 -0.8405 0.2077

  • 10/05/2015 7:14 pmENG432_WS6c

    Page 3 of 7file:///Volumes/MARK%20USB/html/ENG432_WS6c.html

    0.9037 0.8702 -0.8737 0.3585 0.6939 1.0671

    Xo1 =

    1.0000 0.9037 0.3585

    Xo2 =

    -0.8405 0.8702 0.6939

    Xo3 =

    0.2077 -0.8737 1.0671

    K =

    3.8450 -1.9225 0 -1.9225 4.8834 -2.9609 0 -2.9609 9.5862

    detK =

    110.8574

    Setting dx/dt matrices

    dx1dt = @(t1,x1) [x1(4), x1(5), x1(6), (k2*x1(2)-(k1+k2)*x1(1))/m1, (k2*x1(1)-(k2+k3)*x1(2)+k3*x1(3))/m2, (k3*x1(2)-(k2+k4)*x1(3))/m3]';dx2dt = @(t2,x2) [x2(4), x2(5), x2(6), (k2*x2(2)-(k1+k2)*x2(1))/m1, (k2*x2(1)-(k2+k3)*x2(2)+k3*x2(3))/m2, (k3*x2(2)-(k2+k4)*x2(3))/m3]';dx3dt = @(t3,x3) [x3(4), x3(5), x3(6), (k2*x3(2)-(k1+k2)*x3(1))/m1, (k2*x3(1)-(k2+k3)*x3(2)+k3*x3(3))/m2, (k3*x3(2)-(k2+k4)*x3(3))/m3]';

    Time vecotor

    tspan = [0 10]; % creating time vector

    Create unit vectors for x01, x02 and x03

    % I have manually copied and pasted this vector and added three zeros to

  • 10/05/2015 7:14 pmENG432_WS6c

    Page 4 of 7file:///Volumes/MARK%20USB/html/ENG432_WS6c.html

    % ensure matrix is dimmensionally correct. There is probablly another easier wat to do this.

    x010 = [0.05; 0.045185; 0.017925; 0; 0; 0];x020 = [-0.042025; 0.04351; 0.034695;0;0;0];x030 = [0.02077; -0.08737; 0.10671;0;0;0];

    Solving for the ODE's

    [t1,x1] = ode45(dx1dt,tspan,x010);[t2,x2] = ode45(dx2dt,tspan,x020);[t3,x3] = ode45(dx3dt,tspan,x030);

    Plotting the vectors

    figure(1) % new figureplot(t1,x1(:,1:3)); % this is for mode 1title('Time domain response for Mode 1');xlabel('Time [sec.]');ylabel('Amplitude');legend('x1', 'x2', 'x3')grid on

    figure(2) % new figureplot(t2,x2(:,1:3)); % this is for mode 2title('Time domain response for Mode 2');xlabel('Time [sec.]');ylabel('Amplitude');legend('x1', 'x2', 'x3')grid on

    figure(3) % new figureplot(t3,x3(:,1:3)); % this is for mode 3title('Time domain response for Mode 3');xlabel('Time [sec.]');ylabel('Amplitude');legend('x1', 'x2', 'x3')grid on

  • 10/05/2015 7:14 pmENG432_WS6c

    Page 5 of 7file:///Volumes/MARK%20USB/html/ENG432_WS6c.html

  • 10/05/2015 7:14 pmENG432_WS6c

    Page 6 of 7file:///Volumes/MARK%20USB/html/ENG432_WS6c.html

    Plotting the Responses for all modes into a subplot

    figure(4) % new figure

    subplot(3,1,1); % this is for mode 1plot(t1,x1(:,1:3));title('Time domain response for Mode 1');xlabel('Time [sec.]');ylabel('Amplitude');legend('x1', 'x2', 'x3')grid on

    subplot(3,1,2); % This is for mode 2plot(t2,x2(:,1:3));title('Time domain response for Mode 2');xlabel('Time [sec.]');ylabel('Amplitude');legend('x1', 'x2', 'x3')grid on

    subplot(3,1,3); % This is for mode 3plot(t3,x3(:,1:3));title('Time domain response for Mode 3');xlabel('Time [sec.]');ylabel('Amplitude');legend('x1', 'x2', 'x3')grid on

  • 10/05/2015 7:14 pmENG432_WS6c

    Page 7 of 7file:///Volumes/MARK%20USB/html/ENG432_WS6c.html

    Published with MATLAB R2014a