Академический Документы
Профессиональный Документы
Культура Документы
Lab 2 memo
Team name: KAAJ
The purpose of this lab was to use Simulink to create and solve a nonlinear equation of motion for a
pendulum and plot the results. In Table 1 is shown the numerical simulation results. The numbers at the
bottom of the table are the results used to determine the location of the mass to maximize the angular
velocity at the bottom of the swing. This location was found to be 10.6 cm.
Table 1. Numerical simulation results for a pendulum at the bottom of its swing.
Figure 1 shows the Pendulum’s Angular Velocity with respect to the position of the weight, and Figure 2
shows the Swing time of the Pendulum with respect to the position of the weight. Attached to this
document are a printout of the Simulink model and the Matlab m-file used to run the simulation.
Figure 1. Angular Velocity Magnitude of Pendulum with Weight
Position
%simulink parameters
tf = 2; %s
maxstep = 0.01; %s
tol = 1e-6;
theta_d = 0; %rad
theta = pi/2; %rad
%inital conditions
L_wcg = .106; %m
g = 9.81; %m/s
sim('Lab2_sim_mcmahon');
%stops at bottom
theta(end);
figure
plot(t,theta); %plot angular displacement vs time
xlabel('Time (s)');
ylabel('Angular Displacement (rad)');
figure
plot(t,theta_d); %plot angular velocity vs time
xlabel('Time (s)');
ylabel('Angular Velocity (rad/s)');
figure
plot(position,time,'o'); %plot position of pendulum vs time
xlabel('Weight position (cm)');
ylabel('Swing Time (sec)');
figure
plot(position,velocity,'o'); %plot position of pendulum vs
angular velocity
xlabel('Weight Position (cm)');
ylabel('Angular Velocity Magnitude (rad/s)');