Question: % please solve this with ode 4 5 , and explain how . I need the matlab plots, please provide me plots screen shots and

% please solve this with ode45, and explain how . I need the matlab plots, please provide me plots screen shots and matlab codes.
clc;
clear;
clear all;
% System numerical values
m_crank =1;
I_crank =0.5;
m_rod =2;
m_slider =3
l_crank =1;
l_rod =2;
g =9.81;
% Symbolic equations
syms theta x
% Angulat velocity = omega / Slider velocity = v_slider
omega = diff(theta);
v_slider = diff(x);
% C will be used in T_rod
c = sqrt(l_rod^2-(l_crank^2*sin(theta)^2));
%*************************************************************************
% Kinetic energy formulas
% Crank kinetic energy:
T_crank =(1/2)*(1/12)*m_crank*l_crank^2*omega^2;
% Connected rod kinetic energy:
T_rod = m_rod*omega^2*(1/6*(l_rod*l_crank*cos(theta)/c)^2+...
1/2*(l_crank*sin(theta))^2+(1/2)*(l_crank^3/c)*cos(theta)*sin(theta)^2);
% Slider kinetic energy:
T_slider =0.5*m_slider*v_slider^2;
%*************************************************************************
% Potantial energy formula
% Connected rod potential Energy
V_rod =0.5*m_rod*g*l_crank*sin(theta);
% Lagrange equation
T = T_crank + T_rod + T_slider;
V = V_rod;
L = T - V
% Lagrange diff
L_theta = diff(L, theta)
L_theta_dot = diff(L_theta, omega)
Q_theta = sym('tau'); % Applied torque to crank
eq1= L_theta_dot - L_theta == Q_theta
% Initial conditions
theta_0= pi/4; %Initial angle
theta_dot_0=0; % Initial angular velocity

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!