Вы находитесь на странице: 1из 4

CM: 1808

Lab 2 memo
Team name: KAAJ

To: Dr. Cornwell

From: Amy McMahon

Due date: Tuesday December 19, 2017

Re: Swinging Pendulum system Simulink Model

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.

Circular weight Angular velocity


Swing time (s)
position, 𝑳𝐰,𝐜𝐠 (cm) magnitude (rad/s)
4 9.1739 0.2858
9 9.6118 0.2728
10.3 9.6336 0.2722
10.4 9.6340 0.2722
10.5 9.6342 0.2722
10.6 9.6343 0.2722
10.8 9.6338 0.2722
10.9 9.6333 0.2722
11 9.6327 0.2722
11.1 9.6319 0.2722
14 9.5456 0.2747
19 9.2005 0.2850
24 8.7432 0.2999
29 8.2662 0.3172
34 7.8115 0.3357

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

Figure 2. Swing time of Pendulum with Weight Position


clear all
close all
clc

%simulink parameters
tf = 2; %s
maxstep = 0.01; %s
tol = 1e-6;
theta_d = 0; %rad
theta = pi/2; %rad

%parameters for pendulum apparatus


m_p = .0685; %kg
m_w = .088; %kg
L_p = .432; %m
d_w = .05; %m
d_s = .025; %m

%inital conditions
L_wcg = .106; %m
g = 9.81; %m/s

%equations for constants


L_pcg = ((L_p)-(d_s))/2;
%disctance to rod's mass center from pivot point
J = (m_p*(L_p)^2)/12 + ((m_p)*(L_pcg)^2) +
(1/2)*(m_w)*((d_w)/2)^2 + (m_w)*(L_wcg)^2; %equation
for constant J
k = g*((m_p)*(L_pcg) + (m_w)*(L_wcg));
%equation for constant k

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)');

%vectors for swing characteristics with weight change


position = [4; 9; 10.3; 10.4; 10.5; 10.6; 10.8; 10.9; 11;
11.1; 14; 19; 24; 29; 34]; %cm
velocity = [9.1739; 9.6118; 9.6336; 9.6340; 9.6342; 9.6343;
9.6338; 9.6333; 9.6327; 9.6319; 9.5456; 9.2005; 8.7432;
8.2662; 7.8115]; %rad/s
time = [0.2858; 0.2728; 0.2722; 0.2722; 0.2722; 0.2722;
0.2722; 0.2722; 0.2722; 0.2722; 0.2747; 0.2850; 0.2999;
0.3172; 0.3357]; %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)');

Вам также может понравиться