Assignment 1
Assignment 1
1. Acceleraation acg3
O2
Let the frame l lie the reference frame , so we will calculate displacement and velocity
a x = (1135-1805) /150
a x = - 4.66 units/s2
Similarly
a y = - 0.36 units/s2
F = -mag
F = -10 x (-0.36)
F = 3.6N
For the given system we have to find displacement , velocity and acceleration using
matlab software.
The differential equation is converted in the form of matrix The matrix can be solved using
MATLAB for which the code is also given below.
Figure 2 Matrix form
The MATLAB code with figure of displacement, velocity and acceleration are given as
clear all
close all
clc
%% Main Data
% Numerical values
ti = linspace( 0 , 80 , 10000 );
id = 17;
m1 = id/25;
k1 = id*12;
c1 = id/4;
m2 = id/70;
k2 = k1/3;
c2 = c1*4;
m3 = id/35;
k3 = k1/5;
c3 = c1/3;
x10 = id/10;
x20 = -id/20;
x30 = id/20;
dx10 = 0;
dx20 = id/2;
dx30 = id;
% Inputs
u(t) = heaviside(t);
figure
subplot( 1,3,1 )
plot( ti , F1t )
xlabel('time [s]')
ylabel('F1(t)')
grid minor
subplot( 1,3,2 )
plot( ti , F2t )
xlabel('time [s]')
ylabel('F2(t)')
grid minor
subplot( 1,3,3 )
plot( ti , F3t )
xlabel('time [s]')
ylabel('F3(t)')
grid minor
%% The system
A1 = [0 1 0 0 0 0];
A2 = [ -(k1+k2)/m1 -c1/m1 k2/m1 0 0 0 ];
A3 = [ 0 0 0 1 0 0 ];
A4 = [ k2/m2 c2/m2 -k2/m2 -c2/m2 0 0 ];
A5 = [ 0 0 0 0 0 1 ];
A6 = [ 0 0 0 c2/m3 -k3/m3 -(c2+c3)/m3 ];
A = [ A1 ; A2 ; A3 ; A4 ; A5 ; A6 ];
B = [ 0 0 0 ; 1/m1 0 0 ; 0 0 0 ; 0 1/m2 0 ; 0 0 0 ; 0 0 1/m3 ];
C = eye(6);
D = zeros(6,3);
x0 = [ x10 dx10 x20 dx20 x30 dx30 ].';
sys = ss(A,B,C,D);
%% The simulation
% Acelerations
%% Plotting
figure
plot( ti , x(:,1) , ti , x(:,3) , ti , x(:,5) )
legend('m_1','m_2','m_3')
xlabel('time [s]')
ylabel('Position [m]')
grid minor
figure
plot( ti , x(:,2) , ti , x(:,4) , ti , x(:,6) )
legend('m_1','m_2','m_3')
xlabel('time [s]')
ylabel('Velocity [m/s]')
grid minor
figure
plot( ti , a1 , ti , a2 , ti , a3 )
legend('m_1','m_2','m_3')
xlabel('time [s]')
ylabel('Aceleration [m/s^2]')
grid minor
The displacement, velocity and the acceleration does not undergo under
damped vibration.