ME4112 Homework Exercise 2-2024-25
ME4112 Homework Exercise 2-2024-25
____________________________________________________________________________________________
Notes:
1. This is a computational exercise to be written in MATLAB and submitted to Brightspace.
2. Students will work in groups of two. It is acceptable for one student to work on coding and
one to work on report writing.
3. The MATLAB code and report must be your own work. Turnitin will not be used for the
report.
4. A short report (up to eight pages including the title page, figures and Appendix) in PDF
describing the results should be submitted to Brightspace along with the MATLAB .m file.
5. This exercise (coding and report writing) is expected to take up to six hours of private study
time. 10 marks are assigned for correct results; 5 marks are assigned for a well presented
report.
6. Each student must submit a report and MATLAB .m file. Each pair of students should
submit the same report and the same MATLAB file.
7. If Copilot or other AI is used in the solution of the problem or the preparation of the report,
this should be identified in the report references.
8. The closing date for submission is 10 pm Friday, Week 9 (Nov. 8th) on Brightspace.
Submissions will not be accepted after this date.
Figure 1, Two degree of freedom robot arm for a pick and place operation (not to scale).
You are required to determine the force that the robot arm must exert on the component while
lifting it from the conveyor belt (where it is at rest) up to an angle of 90°. You may neglect the
weight of the grips but include the weight of the component being lifted.
2. MATLAB Inputs
The inputs are provided in Table 1. For your analysis, take X in Table 1 as the sixth digit of your
student ID, Y as the second last digit of your student ID and Z as the last digit of your student ID.
If Y or Z are zero, take their value = 6. Use two significant figures in all inputs. Therefore, if your
student ID is 12345607, from Table 1, = 26 degrees, 𝑟̈ = 0.60 m/s2, 𝜃̈ = 0.70 rad/s2.
The MATLAB script should allow for arbitrary input values for 0, 𝑟̈ , 𝜃̈ (not student ID), with the
other fixed values in Table 1 defined in the MATLAB script. Do not use a file for the input values—
they should be requested directly by MATLAB (see Figure 2).
3. Outputs
(a) The code should output the maximum magnitude of the radial force (Fr), transverse force
(F ) and total force (F ) exerted by the robot arm grips on the component in N, and the
corresponding time in s that each occurs (see Table 2).
ME4112, Engineering Mechanics 2 University of Limerick MATLAB Exercises, Page 3 of 6
____________________________________________________________________________________________
(b) The code should provide a plot of radial force (Fr), transverse force (F ) and force
magnitude, (F), as a function of time (see Figure 3).
Table 1, MATLAB inputs and outputs
Fixed values: Value Units
Initial length of fixed arm 0.6 m
Initial length of moving arm, l0 1.0 m
Final angle, f 90 degrees
Mass of the component, m 2.2 kg
Input values:
Initial (at rest) angle of the arm*, 0 2X degrees
Radial acceleration*, 𝑟̈ Y/10 m/s2
Angular acceleration*, 𝜃̈ Z/10 rad/s2
Output values:
Maximum radial force, Fr, and corresponding time Calculated N, s
Maximum transverse force, F, and corresponding time Calculated N, s
Maximum resultant force, F, and corresponding time Calculated N, s
*
See Section 2 for definition of X, Y and Z.
5. Sample solution
A sample solution is provided in Table 2. Figure 2 provides a screen capture of the MATLAB output
and Figure 3 provides a graph of the forces corresponding to these inputs.
ME4112, Engineering Mechanics 2 University of Limerick MATLAB Exercises, Page 4 of 6
____________________________________________________________________________________________
Figure 3, Force vs time plot for robot arm grips from MATLAB, corresponding to data in Table 2.
ME4112, Engineering Mechanics 2 University of Limerick MATLAB Exercises, Page 5 of 6
____________________________________________________________________________________________
6. Marking Scheme
The marking scheme for the exercise is provided in Table 3. Your MATLAB code will be checked
separately by the marker using another set of input values (i.e. not those in your report).
Table 3, Marking scheme
1 1 1 1 6 (3 x 2) 5 15
7. Additional Information
The key equations are provided in the Appendix. A suggested method to code the problem is:
You can find the maximum magnitude of an array and where that maximum occurs using the
command: [maximum, inumber] = max(abs(array));
e.g. if array = [8 -10 9], the above command will return maximum = 10, inumber =
2. The abs function is used to get the magnitude of the values of the array so the result in the
above is 10, not 9.
To add a legend to a graph with multiple lines (as in Figure 3 ) use the following syntax:
legend('First line','Second line','Third line,'Location','north')
8. References
1. O’Dowd, N.P., “Engineering Mechanics 2, ME4112, Dynamics of Particles and Rigid Bodies”,
University of Limerick, Module notes, 2024.
2. Beer, F., Johnston, E., Mazurek, D., Cornwell P. and Self B. “Vector Mechanics for Engineers:
Statics and Dynamics”, McGraw Hill, E-book, 2024. ISBN10: 125963809X, ISBN13:
9781259638091.
ME4112, Engineering Mechanics 2 University of Limerick MATLAB Exercises, Page 7 of 6
____________________________________________________________________________________________
Appendix
The equations for rectilinear motion with constant acceleration can be applied separately to the
arm length and the angle, e.g., for angle, , with constant angular acceleration, 𝜃̈,
(1)
1
𝜃 = 𝜃0 + 𝜃̇0 𝑡 + 𝜃̈ 𝑡 2 . (2)
2
Similarly, for position, r, relative to the centre of rotation of the arm, O, (see Figure 1), with
constant radial acceleration, 𝑟̈ ,
𝑟̇ = 𝑟̇0 + 𝑟̈ 𝑡 (3)
1
𝑟 = 𝑟0 + 𝑟̇0 𝑡 + 𝑟̈ 𝑡 2 . (4)
2
Since the component starts from rest (on the conveyor belt, and ignoring the speed of the belt),
𝜃̇0 = 𝑟̇0 = 0. The initial angle, 0, is an input variable and the initial value of position,
r 0 = 0.6 + l0 = 1.6 (see Figure 1 and Table 1). Once the radial position, r, and radial and angular
speed, 𝑟̇ , 𝜃̇, respectively, of the arm have been determined, the acceleration of the component
can be calculated using polar coordinates,
𝒂 = 𝑎𝑟 𝒆𝑟 + 𝑎𝜃 𝒆𝜃 (5)
= (𝑟̈ − 𝑟𝜃̇ 2 )𝒆𝑟 + (𝑟𝜃̈ + 2𝑟̇ 𝜃̇ )𝒆𝜃 . (6)
The force can then be obtained in polar coordinates using Newton’s second law. To obtain the
force exerted by the grips, we consider a free body diagram of the component, see Figure A1. (
In Figure A1, Fr and Fθ are the radial (r) and transverse ( ) components of the force exerted on
the component by the robot arm grips, then
𝐹𝑟 − 𝑚𝑔 sin 𝜃 = 𝑚𝑎𝑟
𝐹𝜃 − 𝑚𝑔 cos 𝜃 = 𝑚𝑎𝜃
ME4112, Engineering Mechanics 2 University of Limerick MATLAB Exercises, Page 8 of 6
____________________________________________________________________________________________
Note that the magnitude of the force is, by definition, positive. The angle of the arm, , though
not required to determine the acceleration is needed to obtain the force components. The
direction of the force can also be determined from the components 𝐹𝑟 and 𝐹𝜃 and the angle of
the arm, , but this is not required as an output.