Engineering Lab Report - Matlab
Instructor: Lucas Timmins (lucas.timmins@utah.edu) TAs: Allen Lin (allen.lin@utah.edu), Kelly Smith (kelly.a.smith@utah.edu) Each student must turn in a separate laboratory report representing his or her own work. The report should be prepared using Microsoft® Word, or an equivalent word processor, and converted to a pdf file for submission. Grammar and style of the written will be evaluated and included in the grading, so please proof your report, rewrite the initial draft as necessary, and check for spelling and other grammatical errors before submission. The report should contain the following sections: Title/Name: Your report must include the following information (in the following format) in the upper-left corner of the first page:
BIOEN 4250 – Laboratory 2, Fall 2017: Rigid Body Kinematics
Objective (1 paragraph): State the purpose of the lab, including measurements and analysis. Motivate the need for the measurements. State your perception of the intended educational goals of the laboratory in terms of learning new measurement and analysis techniques. Methods:
a) Describe the methods and step-by step procedure to perform the measurements. For example, • Describe each of the recorded positions of the surrogate “knee” • Define manual measurements taken (these values need not be specifically listed, just what was
measured in general) • Use of the electromagnetic digitizer to measure 3D coordinates statically (e.g., what does the digitizer
do? How does it works? which points on the surrogate knee were digitized and why? for which knee positions?, etc.)
b) Provide a high-level step-by-step overview of the program flow in the MATLAB program(s). Describe any
subroutines and reference them by name. Explicitly write (in direct notation) the overall kinematic equations that are used in the MATLAB program to obtain the transformation between embedded coordinate systems.
Sections a) and b) should be no longer than 2 pages, combined.
c) Add comments in the provided MATLAB files to describe EVERY set of executable commands that follow
the denotation “C:”. Each instance of “C:” has a specific question in parentheses that needs to be addressed in your response. Note that some lines have already been commented for you to get you started using the program. It is strongly recommended that you read these initial comments carefully as some of them will also help with the manual portion of your data analysis. Turn in your annotated versions of the programs (Euler_digitizer.m, rot.m, trans.m, transform.m, and mag.m) as a hardcopy appendix to your lab report (see below). You do not need to comment, or turn in a copy of the program titled “suptitle.m”. Please do your own work. NOTE: Comments should not just explain what the code is doing, but why it is being
BIOEN 4250: Laboratory 2 – Report Guide
2
done.
Example of a good comment (full credit): % Using the above temporary z-axis vector directed along the femoral shaft, % establish the y-axis vector by crossing with efx, which is oriented medial-lateral. efy = cross(efx, temp_efz); Example of a bad comment (no credit): % Take the cross product of temp_efz with efx efy = cross(efx, temp_efz);
Tip: Copy and paste the programs into a word processor and make comments there. Please make the comments a different color, and ensure that you do not accidently alter the functionality of the code. Also, when there is a specific question after the “C:” in the code, leave it there so the grader will have an easier time giving you credit for answering it correctly. Results/Discussion (3 pages, including a 2-page limit for plots and table): Run the Matlab code using both your group’s specific files, and the general TA files provided. Generate and turn in the plots and table specified below. This should be done for the general files (‘ta- Position1.xslx’, ‘ta-Position2.xlsx’, etc.) and the group specific files (e.g. ‘w1-Position1.xlsx’, ‘w1-Position2.xlsx’, etc.). All groups need to run the general files, and their own specific group’s files. The plots should obey the following format: Plot 1: Plot both sets of Euler angles (2 sets of 3 angles) for the embedded coordinate systems versus position number from your group’s data files (this plot is generated by the program “Euler_digitized.m”)
Title: Embedded Euler Angle Plots Y-Axes: Angle (Should be in degrees and should be labeled with an axis title, including units) X-Axes: Position Number (corresponds to the order the positions were recorded during the lab. Should be labeled with an axis title.)
Plot 2: Plot both sets of Euler angles (2 sets of 3 angles) for the embedded coordinate systems versus position number from TA provided data files (this plot is generated by the program Euler_digitized.m)
Title: TA Data Embedded Euler Angle Plots Y-Axes: Angle (Should be in degrees and should be labeled with an axis title, including units) X-Axes: Position Number (corresponds to the order the positions were recorded during the lab. Should be labeled with an axis title.)
Table 1: This should be a table of values in the following format containing the indicated information (you could even just copy and paste this table into your report if you want and then fill it out, and update the appropriate information)
Table label: “Table 1” or something of that nature should be indicated above the table at the start of the caption itself. Table Caption: Briefly explain what is shown in the table
BIOEN 4250: Laboratory 2 – Report Guide
3
Magnitude of Translation Vector [𝐓𝐟𝐞→𝐭𝐞] (inches)
Tibial Distraction Calculated from [𝐓𝐟𝐞→𝐭𝐞] (inches)
Tibial Distraction as measured on the fixture
in lab (inches)
TA Data Position 1 TA Data Position 2 TA Data Position 3 Group Data Position 1 Group Data Position 2 Group Data Position 3
In the text of your Results/Discussion you should specifically state the values for the two manually calculated rotations and discuss the data included in your table (for your group’s data and the TA provided data). Also, specifically discuss how these manually calculated angles compare to the Euler angles calculated in the Plots 1 and 2. Interpret your results. Are they what you expected? Why or why not?
The text of this section should not exceed 1 page (not including the plots and table). Also include any comments on how the lab may be improved, or highlight the strengths and weaknesses of the lab. Appendix: Include the commented code for the programs used (see Methods Part c above) as an appendix to the report. This includes: “Euler_Digitizer.m”, “mag.m”, “rot.m”, “trans.m”, and “transform.m”. Please add your comments with a word processor. Please make your comments a different color from the main text.