0% found this document useful (0 votes)
30 views3 pages

Basic Calculations:: Equation of Motion

The document describes a MatLAB test for a basic single degree of freedom system. It provides the equation of motion for an undamped spring-mass system and defines the parameters used. These include a damping ratio of 0.1, mass of 1 kg, spring constant of 100 N/m, initial displacement of 0.02 m, and initial velocity of 0 m/s. It then calculates the natural frequency, damping frequency, and damping period. The response equation for the underdamped system is given. The MatLAB script defines the parameters, calculates the response over 5 cycles using a for loop, and plots the vertical displacement versus time graph.

Uploaded by

lucifer knightz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views3 pages

Basic Calculations:: Equation of Motion

The document describes a MatLAB test for a basic single degree of freedom system. It provides the equation of motion for an undamped spring-mass system and defines the parameters used. These include a damping ratio of 0.1, mass of 1 kg, spring constant of 100 N/m, initial displacement of 0.02 m, and initial velocity of 0 m/s. It then calculates the natural frequency, damping frequency, and damping period. The response equation for the underdamped system is given. The MatLAB script defines the parameters, calculates the response over 5 cycles using a for loop, and plots the vertical displacement versus time graph.

Uploaded by

lucifer knightz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Test 1 MatLAB

Course: MEC521
Name: AZHAR BIN BAHARUDDIN
Student ID: 2012455876
Group: EMD5M3A

Basic Calculations:

Equation of Motion:

+ + = 0

Where;

Equivalent mass, =
Equivalent damping constant, =
Equivalent spring constant, =

Initial/Known data:

Damping ratio, = 0.1


Mass, = 1
Spring constant, = 100 /
Initial displacement, 0 = 0.02
Initial velocity, 0 = 0 /

Calculated data:

100
Natural frequency, = = = = 10 /
1

Damping frequency, = 1 2 = 101 0.12 = 9.95 /


2 2
Damping period, = = 9.95 = 0.63

Time taken to complete 5 cycles; 5 = 5 = 5 0.63 = 3.16

Response equation:

Since the damping ratio is 0.1, the system is considered as underdamped. Therefore, the response
equation (after inserting all the related data) is:

() = (. . + . . )
MatLAB Script:

% This is Test 1 Matlab


% Course : MEC521
% Name : AZHAR BIN BAHARUDDIN
% Student ID: 2012455876
% Group: EMD5M3A

zeta = 0.1; % Damping ratio


m = 1; % Mass
k = 100; % Spring constant
wn = sqrt(k/m); % Natural frequency
x0 = 0.02; % Initial displacement
x0_dot = 0; % Initial velocity
wd = wn * sqrt(1 - zeta^2); % Damping frequency

for i = 1: 101 % Start of loop function to calculate the system response's


cycle
t(i) = (5 * 2 * pi / wn) * (i-1)/100; % Limits the system response graph
to 5 cycles ONLY
x(i) = exp(-zeta * wn * t(i)) * (x0 * cos(wd*t(i)) + ((x0_dot + zeta * wn
* x0) * sin (wd*t(i))/wd)); % System response function
end % End of loop function

plot (t, x); % Plots the graph of system response


ylabel ('Vertical Displacement, x(t)'); % Labels the y-axis of the graph
xlabel ('Time, t'); % Labels the x-axis of the graph
title ('MatLAB Test 1') % Labels the title of the graph
System Response Graph:

You might also like