Abstract: The project consists of simple vibrational problems with two degrees of freedom. As part of the project, we reduced the problem to a differential equation. We then used the differential equation to model the system and plot its response using Simulink. Some problem such as Problem 1 were too complex and due to time limitation, could not be modelled on Simulink. These problems were done using programming on scripts in MATLAB.
Problem 1: Bar Supported by a Wire and Horizontal Plane
Solution:
The problem being too complex could not be simulated on Simulink due to limitations of time. It was solved using functions and code written in script:
This is the function for the RHS of the differential equation.
This is the function for the mass matrix of the system.
This is the script file that generates all the required plots.
l=1; L=1; m=5; g=9.81; w=m*g; d=1.1; tspan=[0 10]; options=odeset('mass','M(t,y)'); % to calculate the initial conditions. % Theta = 0.5233. For this value of theta % using the constraint equation, the value % phi has to be calculated. theta_init = 0.5233; phi_init = asin((d-l*sin(theta_init))/L); y0=[theta_init;0;phi_init;0;0;0]; [t,y]=ode23('indmot_ode1',tspan,y0,options); subplot(2,2,1); plot(t,y(:,3));grid xlabel('Time') ylabel('Phi') title('Phi Vs Time')
subplot(2,2,2); plot(t,y(:,4));grid xlabel('Time') ylabel('Phidot') title('Phidot Vs Time') phi=y(:,3); phidot=y(:,4); % solving the constraint equation to get the value of phi. for i = 1:size(phi,1) theta(i)=asin((d-L*sin(phi(i)))/l); end % solving the constraint equation to get the value of phidot. for i = 1:size(phi,1) thetadot(i)=(L*(-phidot(i))*cos(phi(i)))/(l*cos(theta(i))); end
t1=t'; subplot(2,2,3); plot(t1,theta);grid xlabel('Time') ylabel('Theta') title('Theta Vs Time') subplot(2,2,4); plot(t1,thetadot);grid xlabel('Time') ylabel('Thetadot') title('Thetadot Vs Time')
Figure 1 Response of theeta, theeta(dot), phi & phi(dot) with time
Problem 2: Valve Spring Model
Solution:
(a) Using Newtons Second Law
(b) Using Lagranges Energy Equation
(b) Modelling the Problem on Simulink
Fixed at Both Ends:
Figure 2 Plot of displacement against time
Fixed at one end and free at other end:
Figure 3 Plot of displacement against time
Free at both Ends:
Figure 4 Plot of displacement against time
Problem 3: Double Pendulum
Solution:
Modelling using Sinulink
Figure 3 Plot of theeta1 and theeta2 against time
Problem 4: Analysis of Systems having more than one Degree of Freedom
(a) Using Newtons Second Law
(b) Using Lagranges Energy Equation
Simulation using Simulink
Figure 4 Plot of displacement of mass1 and mass2 against time
Conclusion: The project helped us understand and appreciate how to convert a vibrational system of two degrees of freedom to simple differential equations and how to model and plot the response of the system using Simulink.