Você está na página 1de 6

EN4 Dynamics and Vibrations

Design Project
Optimizing a dynamically tuned projectile launcher
Synopsis
In this project you will use MATLAB simulations to design a simple system to launch a mass to the
maximum possible height. You will assemble and test the device.
1. Organization

This project may be done individually, or in groups of two or three. If you do the project in a
group, each group member must provide an evaluation of the performance of their team-mate on
the project.
To complete the project you must (i) submit a copy of the MATLAB code you used to do the
design calculations; (ii) hand in a one page description of your design; (iii) give a short oral
presentation describing your design calculations; and (iv) assemble and demonstrate your design.
You will assemble and demonstrate your design to faculty or TAs on Friday Feb 27. After
testing your design you should give a short (10 min) presentation describing your design
procedure and the performance of the design. Your MATLAB code and design summary (there
are two separate upload links) must be uploaded to CANVAS by 9am on Fri 27th.

Note that additional TA office hrs will be offered between Sat Feb 21-Thurs Feb 26 see the
announcements page of the course website for details.
2. Overview of design requirements
The figure shows a simple design for launching a mass into the air. It consists of a
set of springs and masses that are mounted on a steel rod, which protrudes from a
flat sheet metal base. The springs and masses are free to slide up and down the rod.
To launch the projectile, the assembly is dropped from an initial height h, so that
its base hits the ground. The springs make the masses rebound. If the masses and
springs are selected carefully, a significant fraction of the energy in the system can
be transferred to the small, topmost mass during the rebound. This will make the
topmost mass fly off the rod at high speed.
Your goal in this project is to use MATLAB to simulate the motion of the springmass system, for the period of time between the instant that the base hits the
ground, and instant where the topmost mass loses contact with the spring beneath
it. You can then use the simulation to predict the combination of springs and masses that will make the
topmost mass fly to the maximum possible height.
You will then assemble and test the design.

Your design must meet the following constraints


1. The total mass used must not exceed 7lb
2. The launched mass must exceed 0.1 lb
3. The height of the topmost point on the rod must not exceed 3ft when it the assembly is dropped
4. Springs must be selected from the list below (you can find detailed specifications for each spring
on http://www.mcmaster.com/ - you can type in the part number to get an engineering drawing
for each spring)
5. Masses must be selected from the list below. If you wish, you can stack masses on top of one
another.
OD
(in)

Length Max Load


(in)
(lb)

1 15/16
2 3/16
2 29/32
2 3/16
2 11/16
2 7/16
2 29/32
1 15/16
2 17/16
2 3/16
3 5/32
1 15/16
2 3/16

1
1
2
2
3
3
3
3
3

5
4
4
5
4
5
4
5
4
4
4
5
4
4
OD
(in)

39
67
176
260
274
445
470
675
597
786
907
1438
1162
1232
Length
(in)

1
1/2
1
1/2
1
1 1/2
2
3

Max
Rate
Part #
Deflection (lb/in)
(in)
2.64
15
9657K215
2.88
23.7 96485K125
2.55
68
96485K154
2.89
90
96485K225
2.06
134.4 96485K161
2.57
175.3 96485K429
1.74
270
96485K178
2.14
312
96485K233
1.27
470
96485K384
1.28
617
96485K187
1.09
831
96485K171
1.5
959
96485K262
1.27
1217.0 96485K147
0.94
1310 96485K194
Weight
(lb)
0.11
0.22
0.454
0.889
1.00
2.00
3.00
4.00
6

Part #
90075K231
90075K231
7786T12
7786T14
8960K51
8960K52
8960K53
8960K54
4470T15

3. Design calculations
You will need to write a MATLAB program to calculate the speed of the topmost mass as it flies off the
rod, given values of the mass and stiffness. You should use the following procedure to do this
1. Calculate (by hand) a formula for the velocity V with which the assembly hits the ground. For
this purpose, you can simply assume that the system behaves like a single particle, which is
dropped from rest and falls for a distance h (the value of h you use is up to you, but cannot exceed
3 feet, less the combined length of the springs and masses). Note that the optimal set of springs
and masses dont depend on V, so you can run the optimization with any convenient initial drop
height (eg 1m) and then calculate the actual drop height afterwards.
2. Assume that the base hits the ground without rebounding, and take time t=0 as the instant at
which the base hits the ground. At this instant, all the masses are moving with speed V
downwards, and the length of each spring is equal to its un-stretched length. These are the initial
conditions for the subsequent motion of the system.
3. Derive equations that govern the motion of the masses after the assembly hits the ground (but
before the topmost mass flies off the rod). To this end
(a) Choose a set of variables to describe the position of each mass (the displacement of the mass
from its position at the moment of impact is a good choice, but other variables like the height
of the mass at the impact point, or the length of each spring, are OK too)
(b) Write down the acceleration vector of each mass in terms of your variables;
(c) Draw a free body diagram for each mass, and use your diagram and the spring force law to
write down F=ma for all the masses. Use the result to set up a system of ODEs for the
position and velocity of each mass. It is OK to neglect gravity and friction in the equations of
motion.
4. Write a MATLAB function that will integrate the equations of motion you derived in step (3) and
hence determine the launch velocity. You will need to include an `event function to identify the
point when the topmost mass leaves the launcher. You can organize your code in any way you
like. Here is a possible outline of a function that will compute the launch velocity, given values
for relevant design variables. The function is designed to be in a form that can be used by the
MATLAB optimizer. Using the optimizer is not required there are other, and in some ways
better, ways to determine the optimal solution. Note that the solution to the design problem is not
unique there are many solutions that work well (some better than others). If you have time you
might find it helpful to come up with several possible candidate designs.

function masslauncher_project
Test your code with the line below
% Design_Variables contains a guess for the masses (lb) and stiffnesses
Design_Variables = [0.1, 0.5, 4, 10, 100, 700];
% This computes the predicted velocity for the guess
% (this always confuses everyone the reason we need the next line is
% that all the calculations are done in a function. The input to the
% function is the design (springs and masses) and the function then
% computes the launch velocity for that design. You can use the MATLAB
% optimizer to try lots of designs and then tell you the best one
% The line below just tests whether the function works. If you delete
% the line the code will do nothing.
Test_vel = findlaunchvel(Design_Variables)
Enter code to call the MATLAB optimizer here.
end
function launchvel = findlaunchvel(Design_Variables)
% Function to calculate the launch velocity, given values
% for the masses and spring stiffnesses in the mass launcher
% Design_Variables is a vector that contains a list of the
% values of masses and stiffnesses [m1,m2,m3...,k1,k2,k3...]
% It is best to work with m in lb and k in lb/in. NB lb is not a
% of mass you have to convert to slugs to do the calculation. (or
% you can convert everything to SI units here if you prefer).
%
% This function must calculate a value for variable launchvel this is
%the velocity of the topmost mass at the instant that it leaves the
%mass launcher
% Set up initial conditions
Initial conditions here
% Call the ODE solver
Call the solver here
% Determine the velocity of the topmost mass
Extract the velocity of the topmost mass at instant of separation here
% To test your code, you could add a command that will
% plot the position of the masses in your system as a function
% of time here. Comment out the command when you do the optimization.
Plot commands here
function dwdt = eom(t,w)
% Function to calculate the time derivative of the variables
% describing the position and velocity of the masses.
Enter code for your equations of motion here
end
function [eventvalue,stopthecalc,eventdirection] = event(t,w)
% Function to identify the point where the top mass is launched.
% To find this point, you should calculate the force in the topmost
% spring the mass will separate from the spring at the point
% where the force changes from compression to tension.
% Make MATLAB stop the calculation at this point.
Enter code to detect the separation here
end
end

5. Use your MATLAB function to try different values of spring stiffness and mass, and try to find
the combination that gives the best launch velocity. If you only plan to use two masses you can
do the optimization by trial and error, or by graphing. For a larger number of masses you may
find it easier to have MATLAB do the optimization for you. The MATLAB tutorial explains
how to use automatic optimizer functions. Alternatively, you can write a brute-force loop that
tests every possible combination but this calculation will run for a very long time...
Here are some tips on doing the optimization (they are helpful whether you choose to do the
optimization by hand or using MATLAB).
The optimization problem is quite difficult it helps to start with a sensible initial guess
for the springs and masses. The mass and stiffness should both increase towards the
bottom of the assembly.
You will find that the springs at the bottom of the assembly may develop tensile forces
before the topmost spring unloads and launches the mass. Strictly speaking, the springs
will lose contact with the masses at this point. The MATLAB optimizer works better if
you dont try to account for this loss of contact. If you want to be very precise, you can
neglect loss of contact and run the optimizer to get an initial guess for the springs and
masses, and then run the optimizer again with a more sophisticated computation which
accounts for the separation. However, it turns out that the optimal values change very
little during the second optimization. It also turns out that loss of contact actually
improves the performance of the device.
If you use the MATLAB optimizer its best to have the optimizer calculate the required
mass and stiffness in lb and lb/in. If you work with SI units, the masses (in kg) have
small values, and the stiffnesses (in N/m) have very large values for reasons that I do
not understand the MATLAB optimizer does not perform well when some of the design
variables have much larger values than others.
6. Once youve found the optimal values for the spring stiffness and mass, you should select springs
and masses from the tables that have the values closest to the optimal choice. You can recalculate the theoretical launch speed with these values.
7. Finally, you must check to make sure that the compression of the springs during the rebound does
not exceed the maximum allowable value (if it does, you can always reduce the drop height).
Note that the maximum allowable compression of the spring refers to the change in length of the
spring, not the positions of the masses.
8. Note that the solution to this design problem is not unique the optimizer will predict many
different possible optimal solutions depending on the initial guess you give it. They will all
perform pretty well, but some are better than others. If you have time you could try to come up
with more than one possible design.
3. Assembly and testing
Once youve designed your device, you can assemble and test it. You will be provided with the rod that
holds the springs and masses all you need to do is to select the appropriate springs and masses, slide
them over the rod, and try the design.

4. Presentation, Report and Grading Rubric


You should submit
1. A commented MATLAB .m file that you used to do the optimization calculations
2. A one or two page description of your design, which must include (a) A table of the predicted
spring stiffnesses and masses (ii) A prediction of the launch velocity; (iii) An estimate of the
energy efficiency of the device, i.e. the ratio of the kinetic energy of the projectile at the instant of
launch to the initial potential energy of the system before the assembly is dropped; and (iv) an
outline of the method you used to determine the optimal values of mass and spring stiffness.
You should also give a short presentation to faculty or TAs describing how you did the optimization.
calculation.
Grading
1. Matlab program to calculate the launch velocity; correctly programmed and clearly
commented so the procedure can be understood: 15 points
2. Design description and Optimization calculation: Found good procedure to determine
optimal masses and stiffness of springs; identified masses and spring stiffness and reported
choice clearly; 10 points
3. Oral presentation: able to explain clearly the calculations and optimization process 5 points
4. Assembly and testing of design 5 points
5. Peer evaluation (for projects done in pairs students doing the project individually
automatically receive full credit) 5 points
TOTAL 40 POINTS

Scheduling a test time on canvas:


Please go to People->Groups, and assign yourself to a group. Once you're assigned a group, you can
choose a testing time under Calendar->Scheduler.
If you are not assigned to a group, you cannot receive a grade.
If your group is not assigned to a testing time, you will also not receive a grade!
A PDF version of your report (which shoul d include a copy of your MATLAB code as an
appendix) MUST be uploaded before your scheduled testing time. Only 1 member of the group
need upload this document.

Você também pode gostar