SlideShare a Scribd company logo
1 of 71
Sheet1-242.7062237.1326187.084-242.7012236.922174.4266-
244.3963224.3101174.6633-247.5536102.916363.6256-
255.3303113.032663.268-254.6957112.727550.2972-
207.6609225.4316188.7366-195.8907223.50710.5973-
202.3447175.467210.5355-250.3654152.0972177.2751-
216.5208147.7045177.3388-233.484149.8988158.7562-
233.5899149.7872196.0947-218.6217259.4074159.1457-
218.7635259.3398196.4452-253.6784127.6148153.4519-
220.1565123.5134153.5878-234.3918143.8452152.9598-
239.238106.8705154.0054-247.5275137.269337.3959-
226.6169107.951137.8928
Sheet1-242.3321237.3833187.0943-242.3044237.2058174.4581-
244.0351224.5884174.62-271.492621.8564163.5829-
271.151124.5395151.0998-272.783812.1067148.4386-
207.2222226.0512188.7679-196.0819224.043210.9913-
202.7517175.151910.9042-250.1148152.3626177.2894-
216.2643148.1046177.3285-233.2696150.1622158.7993-
233.2476150.0874196.0894-218.2906259.6591159.1623-
218.3575259.5781196.4318-256.5068105.7784172.6254-
222.7194101.3124172.3541-239.1924107.4801154.4075-
240.142299.5682190.7925-253.62510.2745130.6542-254.6599-
7.6124166.6589
Sheet1angle5Position 11 7/8fdm - tpmrot0Femur1 3/8dp - da1
1/4dl - dm1 3/8pp - pa4 3/8pa -daTibia1 3/8dp - da1 1/4pl - pm1
3/8pp - pa4 3/8pa - daPosition 230angle 1 3/4fdm - tpm4 7/16t
pa - da 16rotPosition 390angle35rot1 5/16fdm - tpm4 5/8t pa -
da
Sheet1-242.2926237.4313187.1407-242.2976237.2074174.4825-
244.002224.6153174.7045-266.839932.2177122.6565-
269.096439.8643112.768-269.969429.6746105.0252-
207.4538225.8426188.7677-196.2852225.162410.823-
202.7278175.197510.8998-250.2641152.2005177.2745-
216.418147.9588177.3826-233.3907150.0296158.7925-
233.5039149.8913196.094-218.4862259.5074159.1496-
218.6155259.4293196.4586-256.0887109.6023163.2458-
222.3509105.4242163.1927-237.7895118.4377148.3668-
240.681996.2338178.1541-253.514830.151681.5529-
247.32377.4322110.0211
Sheet1-167.9179295.7402188.0109-167.9939295.5717175.3864-
173.1716283.9703175.5642-250.0041102.9112129.0516-
250.4145110.4241118.7922-254.356100.4836111.7631-
136.6091273.7142189.8318-135.4872276.195312.7429-
157.4144226.63711.4406-199.237216.3148178.1369-
167.8298202.3066177.7836-183.8834209.3892159.4639-
183.7567209.3405196.8438-138.7504310.4663160.0457-
138.6953310.3311197.396-216.9796176.5136164.6995-
185.8254162.4202164.0809-197.5133179.0429149.0241-
205.5218160.2233180.3141-239.50295.231187.8262-
238.269973.0878117.6185
Sheet1-167.9774295.7589188.0053Position 1-
168.0357295.5876175.3503-173.216283.9518175.5363-
256.622296.2987172.644-256.202599.1124160.5818-
261.07686.3888157.9777-136.8318273.6341189.8612-
135.6721276.299811.5317-157.9099226.68710.7442-
199.2181216.3236178.1191-167.8099202.4637177.3138-
183.9762209.5402159.1095-183.4766209.2223196.6541-
138.7993310.4902160.0052-138.7065310.3168197.4955-
218.556173.1049174.8681-187.3842159.052174.1021-
202.417168.3658156.1101-204.0305163.8155193.3008-
246.974968.263140.7777-248.281263.4577177.4971
Sheet1-163.9332296.2739188.0595-164.0094296.0685175.3927-
169.2738284.5349175.6338-206.4065173.133663.5365-
210.9568185.008663.7246-210.9498185.223551.0138-
131.6876276.556712.3231-153.9925227.303511.4564-
153.933227.268111.2682-196.0795217.1702178.0817-
164.4559203.0117177.8772-180.5457210.3035159.5472-
180.4487210.0662196.9154-134.6028310.7287160.0411-
134.5312310.562197.4167-205.8811195.7459153.821-
175.285181.6375153.8098-182.6505205.6981153.9805-
198.2314171.6307153.7163-196.7753207.379338.6552-
184.4057172.63937.5567
BIOEN 4250: BIOMECHANICS I
Laboratory 2 – Rigid Body Kinematics
September 11 – 14, 2018
TAs: Allen Lin ([email protected]), Kelly Smith
([email protected])
Lab Quiz: A 10-point lab quiz, which will count towards your
lab grade, will be given at the beginning of
class. Be familiar with the entire protocol.
Objective: The objective of this laboratory is to use a 3D
electromagnetic digitizer to measure the kinematics
of a simplified mechanical surrogate of a knee joint (Figure 1)
under passive flexion. The student
will learn how this measurement technique works and how it
can be combined with the equations
of 3D rigid body kinematics to track the relative motion
between two rigid bodies. The student will
also learn how to decode a Matlab script for analysis of the data
acquired during the lab.
Background: Kinematics is the branch of physics which
involves the description of motion, without examining
the forces which produce the motion (dynamics or kinetics, on
the other hand, involves an
examination of both a description of motion and the forces
which produce it). A subset of
kinematics is that of rigid body kinematics, which as the name
suggests, concerns the motions of
one or more rigid bodies. A rigid body experiences zero
deformation. In other words, all points
lying on a rigid body experience no motion relative to each
other.
In bioengineering, body segments are typically considered to
be rigid bodies. These body
segments are tracked using a number of techniques such as
goniometry, accelerometry,
magnetic tracking, fluoroscopy, video systems, and stereo
photogrammetry. The technique used
in this lab utilizes an electromagnetic digitizer (a manually
operated, instrumented wand with a
probe on the end) to record the coordinates in 3D space of
certain landmarks on the rigid bodies
involved. The techniques used to analyze these captured 3D
coordinates regarding the movement
of these landmarks is very similar to the techniques utilized in
the analysis of similar data obtained
from video based stereo photogrammetry systems, commonly
called photogrammetry. However,
for the sake of time, we have bypassed the video analysis
portion of the process for laboratory 2.
In these visually based systems, which will be used in a
laboratory 3, a number of markers are
tracked using two or more calibrated video cameras. By
placing markers on each body segment, the position and
relative angles of each joint can be found. In the lab today,
this same data will be gathered using the digitizer.
As a possible point of interest, these visual tracking
techniques are most renowned for their use in computer
animation, where markers are placed on actors who are
then videotaped by multiple cameras during a scene (see
VICON Motion Capture Systems). The video data is then
used to re-create the actor’s motions in computer animated
characters. A collaborator of Dr. Jeffrey Weiss (faculty in
BIOEN) actually received an Academy Award for using this
technology in the production of The Lord of the Rings
Trilogy and I-Robot. Photogrammetry is also used in clinical
applications for gait analysis. For example, cerebral palsy
patients are often analyzed using motion tracking systems
in order to determine the abnormalities in their gait. So
called “gait reports” are then given to clinicians who are
often able to use this information to perform corrective
surgeries. Finally, motion tracking of this
Figure 1: Experimental rig setup. The
“L” shape pieces attached to the sides
of the rig have 3 divots that will serve
as kinematic marker clusters. In this
image, the horizontal piece will
represent the femur and the angled
piece the tibia.
BIOEN 4250: Laboratory 2 – Rigid Body Kinematics
2
type is used in numerous research applications, such as tracking
the motion of cadaver knees or
generating data for input into a computational model.
Equipment: The following equipment will be required for each
group. Note that there are only two digitizers.
Thus, each lab section will be divided into multiple time slots
(and each time slot to 2 separate
groups) in order to allow for smaller working groups.
• mechanical knee surrogate with mounting bracket
• MicroScribe electromagnetic digitizer
• allen (hex head) wrench, 3/16”; required for mounting and
adjusting knee surrogate
• digital calipers
• goniometer or protractor
• plastic ruler or tape measurer
Experimental
Procedure:
Please read both handouts on Euler angles (located in the
Handouts section on the Canvas page)
and this entire document before the lab. This will help you
prepare both for the quiz and the actual
lab procedure.
1. Check to ensure the surrogate knee and mounting bracket are
properly secured to the
table (as shown in Figure 1).
2. Set the position of the surrogate knee at ~5° flexion (almost
straight leg) with the two
halves of the lower (tibial) portion of the fixture aligned.
3. Tighten the wing nut at the “knee” to be sure the fixture does
not move.
4. Use the calipers, ruler, protractor, etc. to measure the
distances between the indicated
points on the fixture, as well as the angle between the upper and
lower segment of the
surrogate. The list of measurements you need to take with the
associated definitions is
provided at the end of this document.
5. Using the MicroScribe digitizer, you will digitize the
coordinates necessary to establish an
embedded coordinate system in the upper segment of the fixture
(femur) with respect to
a coordinate system defined with the markers on the femoral
kinematic marker cluster and
repeat this process for the lower segment (tibia). The embedded
coordinate systems
should be set up to follow the conventions in the Coordinate
System Conventions section
below. Digitize the points on the fixture following the order
listed at the end of this
document in the section Order of Digitized Points (note that the
points necessary to
establish the embedded and marker coordinate systems are
included in the list of points
you need to digitize). The TAs will demonstrate the digitization
process at the beginning
of the lab.
6. Save the data file from the digitizer as
“groupID_Position1.xlsx”.
7. Loosen the wing nut and rotate the “knee” to a position of
approximately 30 ̊ flexion and
retighten the wing nut. Rotate the lower half of the lower
section to the 2nd position (TA will
demonstrate this).
8. Using the MicroScribe digitizer, digitize the points on the
fixture in the same manner as
Step 6. Please ask the TAs if you need clarification or help with
the digitization process
and/or order of points. The order of the digitized points should
be the same in all three
positions.
9. Save the data file from the digitizer as
“groupID_Position2.xlsx”.
10. Loosen the wing nut and rotate the “knee” to a position of
approximately 90 ̊ flexion and
retighten the wing nut (with the “tibial” section pointing to the
floor). Rotate the lower half
of the lower section to the 3rd position (TA will demonstrate
this).
BIOEN 4250: Laboratory 2 – Rigid Body Kinematics
3
11. Using the MicroScribe, digitize the specified points on the
fixture once more. Please ask
the TAs if you need clarification or help with the digitization
process and/or order of points.
The order of the digitized points should be the same in all
three positions.
12. Save the data file from the digitizer as
“groupID_Position3.xlsx”.
13. Save all data onto your (or your labmate’s) CADE account
and collect any hand-written
notes before leaving the laboratory. If the data was not saved
under your CADE account,
you are responsible for obtaining the data from your labmate.
Each student should have:
• Three data files from the electromagnetic digitizer
(“..._Position1.xlsx”,
“..._Position2.xlsx”, and “..._Position3.xlsx”).
• Manually recorded measurements taken prior use of the
digitizer at each of the
three positions. This is particularly important for verifying
the digitizer data during
analysis.
• Your notes pertaining to where the coordinates were taken for
the reference
system, as well as what order the landmarks and “markers” were
recorded with the
digitizer.
Data
Analysis:
The objective of the data analysis is to determine the
transformation matrix between the femoral-
and tibial-embedded coordinate systems, as well as the
transformation matrix between the marker
clusters. These transformation matrices will aid in determining
the associated Euler angles during
“knee” flexion/extension. Comparison of the calculated Euler
angles from these two different
transformation matrices will help to illustrate the benefit of
going the extra step to find the
embedded transformation matrices. You will be provided with a
MATLAB program to perform the
majority of the data analysis. Please see the instructions for the
lab report for additional details
on the expected plots/figures from analyzing the data and
regarding the preparation of your report.
The overall picture of the analysis is as follows:
1. Determine the 4x4 transformation matrix between a
coordinate system embedded in the
femur (��) and a coordinate system defined using the femoral
(upper segment) marker
cluster (��), �%&→%(. Note that this transformation never
changes during the test, as both
coordinate systems are affixed to the same rigid body. This
matrix is calculated from the
digitized data from Position #1.
2. Determine the 4x4 transformation matrix between a
coordinate system defined using the
Figure 2: Definition of coordinate transformation matrices.
Schematic shows medial view of
right knee.
BIOEN 4250: Laboratory 2 – Rigid Body Kinematics
4
tibial (lower segment) marker cluster (��) and a coordinate
system embedded in the tibia
(��), �*(→*&. Note that this transformation also never
changes during the test. This matrix
is calculated from the digitized data from Position #1. While the
tibia (lower segment) of
our surrogate is not exactly a rigid body, due to the rotations
between the two parts and
such, we are going to pretend it is (assuming the entire segment
rotates and translates
during motion along with the associated “marker” points).
3. Determine the 4x4 transformation matrix between a
coordinate system defined using the
femoral (upper) marker cluster (��) and a coordinate system
defined using the tibial
(lower) marker cluster (��), [�%(→*((�)], for all positions.
This matrix is calculated from
the digitizer data from all three positions.
4. The overall transformation matrix between the embedded
femoral and tibial coordinate
systems is then:
[�%&→*&(�)] = [�*(→*&][�%(→*((�)][�%&→%(]
5. There are three clinical joint flexion angles
(flexion/extension, abduction/adduction, tibial
rotation) and three translations (medial/lateral tibial
displacement, anterior/posterior tibial
displacement, joint distraction) typically seen during movement
of an actual knee. We will
be calculating the Euler angles associated with the motion based
on the embedded
transformation matrix[�%&→*&(�)], and the “marker”
transformation matrix [�%(→*((�)].
These angles do not always coincide with the clinical angles so
pay attention to the Euler
angle handouts and the orientation of your various coordinate
systems (in the coordinate
systems section below). Also, feel free to ask your TA if you
have any questions.
6. Based on the transformation matrixes [�%&→*&(�)]
determined in the Matlab script,
manually calculate the tibial distraction (should be close to the
distance measured
between the two tibial sections). Refer to the Trigonometry
Review section below to get
the general idea of how to do this. You may use whatever
method you wish to do this
calculation (Maple, Matlab, Excel, pencil and paper, etc.);
however, be sure to indicate the
method used, as well as provide a description of how it was
done, in you report. Please
note, this is not going to be just the value of the difference
between the translation vector
magnitudes from one position to the next. If you are unclear of
the basic idea of how to
calculate this, check with the TA. It will
also be briefly touched on in the lab
session.
7. Use whatever method you like to
confirm angles of rotation you imposed
(flexion/extension, and tibial rotation).
This is why you took all those extra
digitized points at positions 2 and 3.
You will use these manual calculations
for the discussion of your Euler angles
and the translation vector component
of the transformation matrices.
Figure 3: Representation of the “femur” embedded
coordinate system orientation to be used for data
analysis. Note that the axes are not unit axes and not
to scale. The origin is inside the part.
Coordinate
System
Conventions:
Femoral Embedded Coordinate System
The embedded coordinate system for the
femur should be according to that illustrated in
Figure 3. The origin of this coordinate system
is located inside the part approximately
equidistant from the 4 divots at the end closer
to the hinge. In relation to anatomical
reference terminology (proximal, medial, etc.)
the hinge is considered to be the knee. So the
origin is at the distal end of the “femur”, and
the z-axis is positive in the proximal direction.
This is considered to be a left knee, so the
mounting bracket is on the lateral side and
thus, the x-axis is positive in the medial
direction.
Tibial Embedded Coordinate System
The embedded coordinate system for the tibia
should be according to that illustrated in
Figure 4. The origin of this coordinate system is located inside
the part approximately equidistant
from the 4 divots at the end closer to the hinge. In relation to
anatomical reference terminology
(proximal, medial, etc.) the hinge is considered to be the knee.
So the origin is at the proximal
end of the “tibia”, and the z-axis is positive in the proximal
direction. This is considered to be a left
knee, so, again, the mounting bracket is on the lateral side and
thus, the x-axis is positive in the
medial direction.
“Marker” Coordinate Systems
The “marker” coordinate systems are referred to in this way
because they are filling the same roll
that fiduciary markers would fill in a visually based
kinematic tracking system. The data analysis for these
markers will be very similar to that which would be done for
visually tracked fiduciary markers, but will be much
simplified by tracking manually digitized points on our
fixture rather than incorporating vision tracking software.
The coordinate systems for both sets of markers will be set
up exactly the same and should be according to that
illustrated in Figure 5. The origin of these coordinate
systems is located at the “bottom” markers. In relation to
anatomical reference terminology (proximal, medial, etc.),
the x-axes will be positive in the distal direction, the y-axes
will be positive in the anterior direction, and the z-axes will
be positive in the medial direction.
Trigonometry
Review:
This section should help give you a better idea of how to
calculate the “tibial” distraction (translation along the axis of
the lower segment of the fixture) for your lab report.
Basically, all you need to do is make a triangle, and solve
for the angles and the length of the sides. The triangle you
are going to create is shown in Figure 6.
Figure 4: Representation of the “tibial” embedded
coordinate system orientation to be used for data
analysis. Note that the axes are not unit axes and not
to scale. The origin is inside the part.
Figure 5: Representation of the
“marker” embedded coordinate system
orientation to be used for data
analysis. Note that the axes are not
unit axes and not to scale. The origin is
located at the “bottom” marker location.
BIOEN 4250: Laboratory 2 – Rigid Body Kinematics
6
For the sake of the data analysis, let’s look at this same triangle
closer up (Fig. 6). Solving of this
triangle can be accomplished by the use of the sine rule:
�
sin (�)
=
�
sin(�)
=
�
sin (�)
To construct this triangle a few pieces of information should be
recognized:
- Side “�” will be equivalent to the length of the y-z plane
portion of the translation vector
in [�%&→*&(�)] after that vector is rotated back to the
femur embedded coordinate system.
- Side “�” does not change from position to position.
- Side “�” is equal to “�” for Position #1, but is not for
Position 2 and 3 (the difference
between “�” and “�” is the tibial distraction or the translation
along the axis of the lower
segment). The tibial distraction should be similar to the
measured change in length of the
lower segment during the test.
- Angle “�” is equal to (180° flexion angle; flexion angle
should be acquired from the Euler
angles calculated in the provided code, not the angles you
measured by hand.)
Given these assumptions, and observations, you should be able
to determine the tibial distraction
asked for in the report instructions. Please use a reasonable
number of significant figures for your
calculations.
Tips: Use your ruler measurements between the approximate
origins of the coordinate systems as a
rudimentary way to verify the translations (this is not what is
referred to in step 6 or 7). The
components of the rotation matrix can be verified by computing
the appropriate dot products
between the coordinate axes. This yields the cosine of the angle
between the axis for a quick
check that the angles are approximately right.
It will be easiest to verify the transformation matrices if you
stick to the conventions described
above for orientation of your axes. For instance, the coordinate
systems section above always
defines the embedded z-axis along the long direction of the
bone (shaft), with positive in the
proximal direction (toward the body). The embedded x-axis is
always oriented medial-lateral, with
the medial direction as positive. The embedded y-axis is always
oriented anterior-posterior, with
the anterior direction as positive.
When composing the transformation matrices, remember that
you are looking for the
transformation that rotates/translates one set of axes into
another. Make sure that you define your
Figure 6: Left – The triangle you need to make superimposed on
an image of the fixture. Remember that
the embedded origins are inside the parts under the divots.
Right – Generic version of the triangle you
need to make with the interior angles labeled with capital letters
and lengths of the sides labeled in
lowercase letters.
BIOEN 4250: Laboratory 2 – Rigid Body Kinematics
7
displacement vectors appropriately (i.e., don’t get them
backwards).
For the manual calculations in step 6 and 7, try using Matlab to
determine the following:
- Confirm the flexion/extension angle by finding the change in
angle between the vectors formed
between the anterior/posterior points on the two main shafts
closer to the wingnut (for the
“tibia” this would be the anterior/posterior points on the end
that is not twisting). Remember
Position #1 was not at 0° flexion.
- Confirm the tibial rotation angle by finding the change in
angle between vectors formed
between the anterior/posterior points at either end of the “tibia”
segment.
- Determine the distraction along the axis of the tibial shaft by
using the sine rule on a triangle
that has its three vertices at the embedded femoral origin,
embedded tibial origin, and the
hinge (wing nut screw). With this triangle, you should always
be able to determine at least one
angle (Euler angle representing flexion angle determined from
the transformation matrix by
the code) and the length of two sides (1 – the distance from the
embedded femur origin and
screw does not change, and 2- you have the magnitude of the
translation between the two
origins from the transformation matrix). Hint: before trying to
calculate this, it might be helpful
to actually draw a triangle for each of the 3 positions.
- Remember that the dot product of two vectors is � ∙ � =
|�||�|cos (�), so do not forget to
normalize the length of vectors when determining angles
between them.
BIOEN 4250: Laboratory 2 – Rigid Body Kinematics
8
Measurement Sheet
Name: ________________________________ UID:
_______________
Group ID:
__________________________________________________
Position #1
Flexion angle (measured):
_____________________________________________________
_
Femur Distal Medial - Tibia Proximal Medial(in):
_____________________________________
Tibial Rotation angle (degrees):
__________________________________________________
*Note: Just make an estimate. This is fairly awkward to
measure.
Femur
Distal Posterior – Distal Anterior(in):
_______________________________________________
Distal Lateral – Distal Medial (in):
_________________________________________________
Proximal Posterior – Proximal Anterior(in):
__________________________________________
Proximal Anterior – Distal Anterior (in):
_____________________________________________
Tibia
Distal Posterior – Distal Anterior(in):
_______________________________________________
Proximal Lateral – Proximal Medial (in):
____________________________________________
Proximal Posterior – Proximal Anterior(in):
__________________________________________
Proximal Anterior – Distal Anterior (in):
_____________________________________________
Position #2
Flexion angle (measured):
_____________________________________________________
_
Femur Distal Medial – Tibia Proximal Medial(in):
_____________________________________
Tibial Rotation angle (degrees):
__________________________________________________
*Note: Just make an estimate. This is fairly awkward to
measure.
Femur
Distal Posterior – Distal Anterior(in):
_______________________________________________
Distal Lateral – Distal Medial (in):
_________________________________________________
Proximal Posterior – Proximal Anterior(in):
__________________________________________
Proximal Anterior – Distal Anterior (in):
_____________________________________________
Tibia
Distal Posterior – Distal Anterior(in):
_______________________________________________
Proximal Lateral – Proximal Medial (in):
____________________________________________
Proximal Posterior – Proximal Anterior(in):
__________________________________________
Proximal Anterior – Distal Anterior (inches – not including
rotation): ______________________
Note: You could also just measure the gap with calipers and
combine with your last
measurement.
same as Position #1
same as Position #1
same as Position #1
same as Position #1
same as Position #1
same as Position #1
same as Position #1
BIOEN 4250: Laboratory 2 – Rigid Body Kinematics
9
Position #3
Flexion angle (measured):
_____________________________________________________
_
Femur Distal Medial - Tibia Proximal Medial(in):
______________________________________
Tibial Rotation angle (degrees):
__________________________________________________
*Note: Just make an estimate. This is fairly awkward to
measure.
Femur
Distal Posterior – Distal Anterior(in):
_______________________________________________
Distal Lateral – Distal Medial (in):
_________________________________________________
Proximal Posterior – Proximal Anterior(in):
__________________________________________
Proximal Anterior – Distal Anterior (in):
_____________________________________________
Tibia
Distal Posterior – Distal Anterior(in):
_______________________________________________
Proximal Lateral – Proximal Medial (in):
____________________________________________
Proximal Posterior – Proximal Anterior(in):
__________________________________________
Proximal Anterior – Distal Anterior (inches – not including
rotation): ______________________
Note: You could also just measure the gap with calipers and
combine with your last
measurement.
Order of Digitized Points
1. Femur Marker Top
2. Femur Marker Bottom
3. Femur Marker Front
4. Tibia Marker Top
5. Tibia Marker Bottom
6. Tibia Marker Front
7. Frame Upper Back Corner
8. Frame Lower Back Corner
9. Frame Lower Front Corner
10. Femur Distal –Medial
11. Femur Distal – Lateral
12. Femur Distal – Posterior
13. Femur Distal – Anterior
14. Femur Proximal – Posterior
15. Femur Proximal – Anterior
16. Tibia Proximal – Medial
17. Tibia Proximal – Lateral
18. Tibia Proximal – Posterior
19. Tibia Proximal – Anterior
20. Tibia Distal – Posterior
21. Tibia Distal – Anterior
same as Position #1
same as Position #1
same as Position #1
same as Position #1
same as Position #1
same as Position #1
same as Position #1
matlab_files/distraction.m
%This code does as the lab states:
%it rotates the tibial-femoral translation vector from tibial
frame to the
%femoral frame. Then it finds the magnitude of just the yz
portion of this
%vector
t1 = T_fe_te1(1:3,1:3)'*T_fe_te1(1:3, 4);
t2 = T_fe_te2(1:3,1:3)'*T_fe_te2(1:3, 4);
t3 = T_fe_te3(1:3,1:3)'*T_fe_te3(1:3, 4);
c = [norm(t1(2:3)) norm(t2(2:3)) norm(t3(2:3))];
matlab_files/Euler_Digitizer.m
% BIOEN 4250 FALL 2018 LAB 2 - Rigid Body Kinematics
% PROF. Lucas Timmins
% TAs: Allen Lin and Kelly Smith
% Code Written by E. David Bell, modified from code
developed by TREVOR LUJAN
% ########### RIGID BODY KINEMATICS
###############
% STUDENT NAME :
% STUDENT ID :
% STUDENT GROUP :
% Clear all stored variables and set output format to short,
% which is a 5 digit format
clear all;
format short;
% Load the file containing the digitized points for Position 1.
This 3
% column matrix will be used to determine the transformations
between the
% marker clusters and embedded systems, to be inputted in the
overall
% transformation matrix.
D1 = xlsread('Position 1.xlsx');
% Load the file containing the digitized points for Position 2.
This 3
% column matrix will be used to determine the transformations
between the
% marker clusters specific to Position 2.
D2 = xlsread('Position 2.xlsx');
% Load the file containing the digitized points for Position 3.
This 3
% column matrix will be used to determine the transformations
between the
% marker clusters specific to Position 3.
D3 = xlsread('Position 3.xlsx');
% FORMULATE THE COORDINATE SYSTEM FOR THE
KINEMATIC MARKERS
% "KINEMATIC MARKERS" ARE THE DIVITS ON THE L
SHAPED PLATES THAT ARE TRACKED
% AT EACH POSITION - ONE SET FOR FEMUR (upper
section)AND ONE SET FOR TIBIA
% (lower section). THEY ARE REFFERED TO AS
"MARKERS" IN ORDER TO
% DISTINGUISH THEM FROM THE POINTS USED TO
MAKE THE EMBEDED COORDINATE
% SYSTEMS (THOSE DIVITS ON THE MAIN PIECES OF
THE FIXTURE)AND BECAUSE THE
% SAME ANALYSIS PROCEDURE WOULD BE DONE HAD
THIS DATA BEEN AQUIRED FROM
% VISUAL TRACKING SOFTWARE.
% *********** ESTABLISH ORTHONORMAL COORDINATE
SYSTEM ON FEMUR USING KINEMATIC MARKERS
****************
%%%%%%%%%%%%%%%%%%%%%%%%%% Naming
Conventions
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% dft: digitized femur top : REFERS TO THE DIVIT AT THE
TOP OF THE L PIECE INITIALLY
% dfb: digitized femur bottom : REFERS TO THE MIDDLE
DIVIT ON THE L PIECE
% dff: digitized femur front : REFERS TO THE DIVIT ON
THE L PIECE CLOSEST TO THE JOINT
% e_dfx: base vector along x digitized femur
% (2 PTS) C: (What does the following 3 lines of code do?)
dft = D1(1,1:3);
dfb = D1(2,1:3);
dff = D1(3,1:3);
% (4 PTS) C: (What does the following do (2 pts) and
specifically, why are
%the cross products taken? (2 pts))
dfx = dff - dfb;
tempdfy = dft - dfb;
dfz = cross(dfx,tempdfy);
dfy = cross(dfz,dfx);
% (2 PTS) C: (What does the following code do?)
e_dfx = dfx/mag(dfx);
e_dfy = dfy/mag(dfy);
e_dfz = dfz/mag(dfz);
% *********** ESTABLISH ORTHONORMAL COORDINATE
SYSTEM ON TIBIA USING KINEMATIC MARKERS
****************
%load tibia kinematic marker coordinates
%%%%%%%%%%%%%%%%%%%%%%%%%% Naming
Conventions
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% dtt: digitized tibia top : REFERS TO THE DIVIT AT THE
TOP OF THE L PIECE INITIALLY
% dtb: digitized tibia bottom : REFERS TO THE MIDDLE
DIVIT ON THE L PIECE
% dtf: digitized tibia front : REFERS TO THE DIVIT ON THE
L PIECE CLOSEST TO THE JOINT
% e_dtx: base vector along x digitized tibia
% (2 PTS) C: (How is this section of the code different from the
similar
% section above?)
dtt = D1(4,1:3);
dtb = D1(5,1:3);
dtf = D1(6,1:3);
dtx = dtf - dtb;
tempdty = dtt - dtb;
dtz = cross(dtx,tempdty);
dty = cross(dtz,dtx);
e_dtx = dtx/mag(dtx);
e_dty = dty/mag(dty);
e_dtz = dtz/mag(dtz);
% *********** ESTABLISH ORTHONORMAL REFERENCE
COORDINATE SYSTEM FOR
TROUBLESHOOTING****************
%This section of the code is commented out because it is not
normally
%needed, but please still address the one comment requested
below.
%%%%%%%%%%%%%%%%%%%%%%%%%% Naming
Conventions
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% drt - digitized reference top: Top back corner of the
mounting frame adjacent to the "femur"
% drb - digitized reference bottom: Bottom back corner of the
mounting frame
% drf - digitized reference front: Bottom front corner of the
mounting frame
% e_drx: base vector along x digitized reference
% C: (6 pts) (Explain where the reference system was taken (2
pts) and how it would
% be usefull for trouble shooting (4 pts). )
% drt = D1(7,1:3);
% drb = D1(8,1:3);
% drf = D1(9,1:3);
%
% drz = drt - drb;
% tempdry = drf - drb;
% drx = cross(tempdry,drz);
% dry = cross(drz,drx);
%
% e_drx = drx/mag(drx);
% e_dry = dry/mag(dry);
% e_drz = drz/mag(drz);
% ****** EMBEDDED COORDINATE SYSTEMS IN FEMUR
AND TIBIA [DIGITIZED] *******
% NOTE: The mechanical surrogate "knee" is considered to be a
left knee in
% relation to which side is medial vs lateral. Therefore, the side
with the
% mounting bracket attached is the lateral side, and the side
with the
% "markers" attached is the medial side.
%%%%%%%%%%%%%%%%%%%%%% Naming
Conventions
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%e: embedded, m: medial, l: lateral, o: origin, d: distal
%a: anterior, p: posterior f: femur, t: tibia, Prox: proximal
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%
% *********** EMBEDDED FEMUR (femur = upper segment
of fixture) ***********
% Load embedded femur, lateral coordinates
efl = D1(11,1:3);
% Load embedded femur, medial
efm = D1(10,1:3);
% Create a vector in the femoral embedded medial direction
following the
% coordinate axis conventions in the report instructions
efx = efm-efl;
% (2 PT) C: (Which points are loaded in the following two lines
of code?)
efda = D1(13,1:3);
efdp = D1(12,1:3);
% (4 PTS) C: (Explain why a mean is taken)
A = [efdp;efda];
efd = mean(A);
% (2 PT) C: (What data points are loaded in the following 2
lines of code?)
efaProx = D1(15,1:3);
efpProx = D1(14,1:3);
% (4 PTS) C:(Explain why a mean is taken)
A = [efaProx;efpProx];
efProx = mean(A);
% (4 PTS) C: (What does "temp_efz" represent, AND why was
it not
%calculated directly from digitized points like has been done
in other
%parts of the code?)
temp_efz = efProx-efd;
efy = cross(efx, temp_efz);
efz = cross(efx,efy);
% (2 PTS) C: (What does the following code do?)
e_efx = efx/mag(efx);
e_efy = efy/mag(efy);
e_efz = efz/mag(efz);
% *********** EMBEDDED TIBIA (tibia = lower segment of
fixture)************
% SAME NAMING CONVENTIONS AS EMBEDDED FEMUR
%
etl = D1(17,1:3);
etm = D1(16,1:3);
etx = etm-etl;
etaProx = D1(19,1:3);
etpProx = D1(18,1:3);
A = [etaProx;etpProx];
etProx = mean(A);
etda = D1(21,1:3);
etdp = D1(20,1:3);
A = [etda;etdp];
etd = mean(A);
temp_etz = etProx-etd;
ety = cross(etx, temp_etz);
etz = cross(etx,ety);
e_etx = etx/mag(etx);
e_ety = ety/mag(ety);
e_etz = etz/mag(etz);
% *********** MARKER TO EMBEDDED
TRANSFORMATION MATRICES ****************
% (4 PTS) C:(What does the following function produce, {i.e.
what is
%"T_fe_fm")(2 pts), and what it will be used for? (2 pts))
T_fe_fm = transform(e_efx, e_efy, e_efz,e_dfx, e_dfy,
e_dfz,efd,dfb);
% (4 PTS) C: (What does the following function produce, {i.e.
what is
%"T_tm_te")(2 pts), and what it will be used for? (2 pts))
T_tm_te = transform(e_dtx, e_dty, e_dtz, e_etx, e_ety, e_etz,
dtb, etProx);
%%% PROCESS "MARKER" MOTION TRACKING DATA
AND CALCULATE THE EULER ANGLES%%%
%%%%%%%%%%%%%%%%%%%%%%%%% Naming
Conventions
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%mff: marker femur front mtf: marker tibia front
%mft: marker femur top mtt: marker tibia top
%mfb: marker femur bottom mtb: marker tibia bottom
%e_mfx: base vector along x marker femur
%e_mtz: base vector along z marker tibia
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%
% (4 PTS) C: (In general, what does each cycle of the following
loop do?)
i=1;
for i=1:1:3
if i==1
M = D1;
end
if i==2
M = D2;
end
if i==3
M = D3;
end
% (2 PTS) C: (What is being loaded in the following 3 lines
of code?)
mft = M(1,:);
mfb = M(2,:);
mff = M(3,:);
% (2 PTS) C: (What do the following lines of code do, and
why is the
%cross product taken?)
mfx = mff - mfb;
temp_mfy = mft - mfb;
mfz = cross(mfx,temp_mfy);
mfy = cross(mfz,mfx);
% (2 PTS) C: (What does the following code do?)
e_mfx = mfx/mag(mfx);
e_mfy = mfy/mag(mfy);
e_mfz = mfz/mag(mfz);
% (4 PTS) C:(In general, what does the following block of
code do? {up
%the next comment}
mtt = M(4,:);
mtb = M(5,:);
mtf = M(6,:);
mtx = mtf - mtb;
temp_mty = mtt - mtb;
mtz = cross(mtx,temp_mty);
mty = cross(mtz,mtx);
e_mtx = mtx/mag(mtx);
e_mty = mty/mag(mty);
e_mtz = mtz/mag(mtz);
% (4 PTS) C: (What does the following function produce,
{i.e. what is
%"T_fm_tm")(2 pts), and what it will be used for? (2 pts))
T_fm_tm = transform(e_mfx, e_mfy, e_mfz, e_mtx, e_mty,
e_mtz, mfb, mtb);
% (4 PTS) C: (What does the following function produce,
{i.e. what is
%"T_fe_te")(2 pts), and what it will be used for? (2 pts))
T_fe_te = [T_tm_te]*[T_fm_tm]*[T_fe_fm];
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%
% The following set of "if" statements simply saves the
values of
% T_fm_tm and T_fe_te as seperate variables so their values
from each
% loop iteration will be available to the user via the
command window
% after the program finishes. This variables should be useful
for the
% manual calculation of the contents of Table 1 in the lab
report.
if i==1
T_fm_tm1 = T_fm_tm;
T_fe_te1 = T_fe_te;
end
if i==2
T_fm_tm2 = T_fm_tm;
T_fe_te2 = T_fe_te;
end
if i==3
T_fm_tm3 = T_fm_tm;
T_fe_te3 = T_fe_te;
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%
%%%%%%%%% CALCULATE EULER ANGLES FROM
EMBEDED TRANSFORMATIONS %%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%% Naming
Conventions %%%%%%%%%%%%%%%%%%%%%%%%%%
%gamma#= rotation about x-axis(rad) gamma#Deg= rotation
about x-axis(deg)
%theta#= rotation about y-axis(rad) theta#Deg= rotation
about y-axis(deg)
%phi# = rotation about z-axis(rad) phi#Deg= rotation about
z-axis(deg)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%
% NOTE: Remember, each transformation has 2 complete
sets of Euler
% angles (thus gamma1 is from the first set, and gamma2 is
from the
% second set).
% (4 PTS) C: (In general, what does the code from here to
the end of
% the loop do?)
T=T_fe_te;
%(2 PTS) C: (What does this following 3 lines calculate?)
theta1=-asin(T(3,1));
gamma1=atan2((T(3,2)/cos(theta1)),(T(3,3)/cos(theta1)));
phi1=atan2((T(2,1)/cos(theta1)),(T(1,1)/cos(theta1)));
%(2 PTS) C: (Why are a second set of calculations performed
in the
%following 3 lines that is so similar to that in the 3 lines
above?)
theta2=pi-theta1;
gamma2=atan2((T(3,2)/cos(theta2)),(T(3,3)/cos(theta2)));
phi2=atan2((T(2,1)/cos(theta2)),(T(1,1)/cos(theta2)));
%(2 PTS) C: (What are the two things accomplished by the
following
%6 lines of code?)
theta1Deg(i) = theta1*(180/pi);
gamma1Deg(i) = gamma1*(180/pi)';
phi1Deg(i) = phi1*(180/pi);
theta2Deg(i) = theta2*(180/pi);
gamma2Deg(i) = gamma2*(180/pi);
phi2Deg(i) = phi2*(180/pi);
end
% (1 pt) C: (What is the following variable use for?)
Position = [1, 2, 3];
% (5 PTS) C: (Provide an explanation of the subplots)
figure(1);
title('Embedded Euler Angle Plots');
orient landscape;
subplot(2,3,1)
plot(Position,gamma1Deg)
title ('Gamma-1 (rotation about x-
axis)'),ylabel('Angle(Deg)'),xlabel('Position Number');
subplot(2,3,2)
plot(Position,theta1Deg)
title ('Theta-1 (rotation about y-
axis)'),ylabel('Angle(Deg)'),xlabel('Position Number');
subplot(2,3,3)
plot(Position,phi1Deg)
title ('Phi-1 (rotation about z-
axis)'),ylabel('Angle(Deg)'),xlabel('Position Number');
subplot(2,3,4)
plot(Position,gamma2Deg)
title ('Gamma-2 (rotation about x-
axis)'),ylabel('Angle(Deg)'),xlabel('Position Number');
subplot(2,3,5)
plot(Position,theta2Deg)
title ('Theta-2 (rotation about y-
axis)'),ylabel('Angle(Deg)'),xlabel('Position Number');
subplot(2,3,6)
plot(Position,phi2Deg)
title ('Phi-2 (rotation about z-
axis)'),ylabel('Angle(Deg)'),xlabel('Position Number');
%For clarification, in the following 2 lines, "F1" is the handle
the
%program uses to refer to figure(1), and the set function, is
defining
%the property "Position"(which is how the program defines
where, and how
%large the figure will be on the screen). Feel free to adjust this
if you
%wish to get the figure to be the size you want. Dave (your TA)
will be
%happy to explain how to do this, during office hours, if you
want
%(along with any other coding questions you may have for this
lab).
F1 = gcf;
set(F1,'Position', [19 187 1284 477])
%"SUPTITLE" Adds a master title to the entire figure above all
the other
%subplots. Dave got this subfunction on a webpage where
people can submit
%specialized Matlab codes they wrote themselves.
%YOU NEED TO USE THIS SUBFUNCTION TO GET THIS
CODE TO WORK, BUT YOU DO NOT
%NEED TO INCLUDE IT IN YOUR APPENDIX
%Please remember to update this title to designate the figure as
being from
%your specific group data, or the TA provided data.
suptitle('Embedded Euler Angle Plots')
message='NORMAL TERMINATION!'
matlab_files/mag.m
function length = mag(x)
% (5 PTS) C: (What is the output of this function?)
length =
sqrt((x(1,1))*(x(1,1))+(x(1,2))*(x(1,2))+(x(1,3))*(x(1,3)));
matlab_files/rot.m
function matrix = rot(x1,y1,z1,x2,y2,z2)
% (5 PTS) C: (What does this subfunction do (3 pts), and what
is the origin
%of this equation? (2 pts) )
matrix = [sum(x2.*x1), sum(x2.*y1), sum(x2.*z1);
sum(y2.*x1), sum(y2.*y1), sum(y2.*z1);
sum(z2.*x1), sum(z2.*y1), sum(z2.*z1)];
matlab_files/suptitle.m
function hout=suptitle(str)
%SUPTITLE Puts a title above all subplots.
% SUPTITLE('text') adds text to the top of the figure
% above all subplots (a "super title"). Use this function
% after all subplot commands.
% Drea Thomas 6/15/95 [email protected]
% Warning: If the figure or axis units are non-default, this
% will break.
% Parameters used to position the supertitle.
% Amount of the figure window devoted to subplots
plotregion = .92;
% Y position of title in normalized coordinates
titleypos = .95;
% Fontsize for supertitle
fs = get(gcf,'defaultaxesfontsize')+4;
% Fudge factor to adjust y spacing between subplots
fudge=1;
haold = gca;
figunits = get(gcf,'units');
% Get the (approximate) difference between full height (plot +
title
% + xlabel) and bounding rectangle.
if (~strcmp(figunits,'pixels')),
set(gcf,'units','pixels');
pos = get(gcf,'position');
set(gcf,'units',figunits);
else,
pos = get(gcf,'position');
end
ff = (fs-4)*1.27*5/pos(4)*fudge;
% The 5 here reflects about 3 characters of height below
% an axis and 2 above. 1.27 is pixels per point.
% Determine the bounding rectange for all the plots
% h = findobj('Type','axes');
% findobj is a 4.2 thing.. if you don't have 4.2 comment out
% the next line and uncomment the following block.
h = findobj(gcf,'Type','axes'); % Change suggested by Stacy J.
Hills
% If you don't have 4.2, use this code instead
%ch = get(gcf,'children');
%h=[];
%for i=1:length(ch),
% if strcmp(get(ch(i),'type'),'axes'),
% h=[h,ch(i)];
% end
%end
max_y=0;
min_y=1;
oldtitle =0;
for i=1:length(h),
if (~strcmp(get(h(i),'Tag'),'suptitle')),
pos=get(h(i),'pos');
if (pos(2) < min_y), min_y=pos(2)-ff/5*3;end;
if (pos(4)+pos(2) > max_y),
max_y=pos(4)+pos(2)+ff/5*2;end;
else,
oldtitle = h(i);
end
end
if max_y > plotregion,
scale = (plotregion-min_y)/(max_y-min_y);
for i=1:length(h),
pos = get(h(i),'position');
pos(2) = (pos(2)-min_y)*scale+min_y;
pos(4) = pos(4)*scale-(1-scale)*ff/5*3;
set(h(i),'position',pos);
end
end
np = get(gcf,'nextplot');
set(gcf,'nextplot','add');
if (oldtitle),
delete(oldtitle);
end
ha=axes('pos',[0 1 1 1],'visible','off','Tag','suptitle');
ht=text(.5,titleypos-
1,str);set(ht,'horizontalalignment','center','fontsize',fs);
set(gcf,'nextplot',np);
axes(haold);
if nargout,
hout=ht;
end
matlab_files/trans.m
function matrix = trans(R,U)
% (5 PTS) C: (Please state what this function does (3 pts), and
why
% functions are valuable in coding in general. (2 pts))
matrix = [R(1,1), R(1,2), R(1,3), U(1,1);
R(2,1), R(2,2), R(2,3), U(1,2);
R(3,1), R(3,2), R(3,3), U(1,3);
0 , 0 , 0 , 1];
matlab_files/transform.m
function T_i1_i2 = transform(i1x,i1y,i1z,i2x,i2y,i2z,o1,o2)
%For clarification, a global origin is created here. This is
needed to
%determine the translation between coordinate system 1 (our
starting point)
%and coordinate system 2 (the one we're transforming to).
origx = [1 0 0];
origy = [0 1 0];
origz = [0 0 1];
orig = [origx;origy;origz];
origc = [0 0 0];
%For clarification, when calculating the transformation matrix
between two
%coordinate systems using an optical technique (which we are
attempting to
%mimic with our digitized "marker" data) we need to take into
consideration
%what coordinate system the translation is in. The translation
between the
%coordinate systems is calculated by subtracting the coordinate
system
%origins. This gives a translation in the global coord system.
The
%translation in the transformation matrix needs to be in terms
of the
%current coordinate system (the one we are transforming to). If
the
%translation between the coordinate system origins was in
terms of the
%reference coordinate system (the one we started from), we
could just
%multiply the translation by the rotation between the two
systems (t'=Mt).
%However, as we stated, the translation is in terms of the global
system,
%so the translation needs to be multiplied by the rotation of the
global
%system to the current system. One way of doing this is to
transform
%through the global origin.
% (2 PTS) C: (What does each of the 2 resulting matrixes below
represent?)
R_i1_orig = rot(i1x,i1y,i1z,origx, origy, origz);
R_orig_i2 = rot(origx, origy, origz,i2x,i2y,i2z);
% (1 PTS) C: (What is calculated in the 2 lines of code below?)
u_i1_orig = o1-origc;
u_orig_i2 = origc-o2;
% C: (Explain why these are calculated differently from each
other)
%(1 PT Extra Credit)
t_i1_orig = u_i1_orig';
t_orig_i2 = R_orig_i2*u_orig_i2';
% (1 PTS) C: (What is calculated in the 2 lines below?)
T_i1_orig = trans(R_i1_orig,t_i1_orig');
T_orig_i2 = trans(R_orig_i2,t_orig_i2');
% (1 PTS) C: What is the result of the following, i.e. what is
the output
%of this subfunction?)
T_i1_i2 = [T_orig_i2]*[T_i1_orig];
BIOEN 4250: BIOMECHANICS I
Laboratory 2 – Rigid Body Kinematics
Report Guide
Due Date: Thursday, October 2, 2017 (submit via Canvas)
Instructor: Lucas Timmins ([email protected])
TAs: Allen Lin ([email protected]), Kelly Smith
([email protected])
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
<YOUR NAME HERE>
<YOUR GROUP ID>
<DATE HERE>
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: <group ID> 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.

More Related Content

Similar to Sheet1-242.7062237.1326187.084-242.7012236.922174.4266-244.3963224.docx

Interactive Full-Body Motion Capture Using Infrared Sensor Network
Interactive Full-Body Motion Capture Using Infrared Sensor Network  Interactive Full-Body Motion Capture Using Infrared Sensor Network
Interactive Full-Body Motion Capture Using Infrared Sensor Network
ijcga
 
Bu32888890
Bu32888890Bu32888890
Bu32888890
IJMER
 

Similar to Sheet1-242.7062237.1326187.084-242.7012236.922174.4266-244.3963224.docx (20)

A Study of Motion Detection Method for Smart Home System
A Study of Motion Detection Method for Smart Home SystemA Study of Motion Detection Method for Smart Home System
A Study of Motion Detection Method for Smart Home System
 
Wearable Gait Classification Using STM Sensortile
Wearable Gait Classification Using STM SensortileWearable Gait Classification Using STM Sensortile
Wearable Gait Classification Using STM Sensortile
 
Virtual Yoga System Using Kinect Sensor
Virtual Yoga System Using Kinect SensorVirtual Yoga System Using Kinect Sensor
Virtual Yoga System Using Kinect Sensor
 
Based on visual basic differential workbench system design and implementation...
Based on visual basic differential workbench system design and implementation...Based on visual basic differential workbench system design and implementation...
Based on visual basic differential workbench system design and implementation...
 
IRJET - A Novel Technology for Shooting Sports
IRJET - A Novel Technology for Shooting SportsIRJET - A Novel Technology for Shooting Sports
IRJET - A Novel Technology for Shooting Sports
 
Dual Angle Comparison for Wheel Chair Vehicle using Fuzzy Logic
Dual Angle Comparison for Wheel Chair Vehicle using Fuzzy LogicDual Angle Comparison for Wheel Chair Vehicle using Fuzzy Logic
Dual Angle Comparison for Wheel Chair Vehicle using Fuzzy Logic
 
Industrial application of machine vision
Industrial application of machine visionIndustrial application of machine vision
Industrial application of machine vision
 
372814
372814372814
372814
 
Gesture Controlled Wheelchair With Stretcher
Gesture Controlled Wheelchair With StretcherGesture Controlled Wheelchair With Stretcher
Gesture Controlled Wheelchair With Stretcher
 
Image guided surgery
Image guided surgeryImage guided surgery
Image guided surgery
 
Module 2_Localization And Tracking.pptx
Module 2_Localization And Tracking.pptxModule 2_Localization And Tracking.pptx
Module 2_Localization And Tracking.pptx
 
Tuning of Ball and Beam System using Cascade Control
Tuning of Ball and Beam System using Cascade ControlTuning of Ball and Beam System using Cascade Control
Tuning of Ball and Beam System using Cascade Control
 
White Paper- Encoder
White Paper- EncoderWhite Paper- Encoder
White Paper- Encoder
 
CROWD ANALYSIS WITH FISH EYE CAMERA
CROWD ANALYSIS WITH FISH EYE CAMERA CROWD ANALYSIS WITH FISH EYE CAMERA
CROWD ANALYSIS WITH FISH EYE CAMERA
 
CROWD ANALYSIS WITH FISH EYE CAMERA
CROWD ANALYSIS WITH FISH EYE CAMERACROWD ANALYSIS WITH FISH EYE CAMERA
CROWD ANALYSIS WITH FISH EYE CAMERA
 
Interactive Full-Body Motion Capture Using Infrared Sensor Network
Interactive Full-Body Motion Capture Using Infrared Sensor Network  Interactive Full-Body Motion Capture Using Infrared Sensor Network
Interactive Full-Body Motion Capture Using Infrared Sensor Network
 
Epma 010
Epma 010Epma 010
Epma 010
 
Bu32888890
Bu32888890Bu32888890
Bu32888890
 
IRJET- Development and Monitoring of a Fall Detection System through Wear...
IRJET-  	  Development and Monitoring of a Fall Detection System through Wear...IRJET-  	  Development and Monitoring of a Fall Detection System through Wear...
IRJET- Development and Monitoring of a Fall Detection System through Wear...
 
Motion compensation for hand held camera devices
Motion compensation for hand held camera devicesMotion compensation for hand held camera devices
Motion compensation for hand held camera devices
 

More from bjohn46

Sheet1Rate your skills using the following scaleChapter 1 You Ma.docx
Sheet1Rate your skills using the following scaleChapter 1 You Ma.docxSheet1Rate your skills using the following scaleChapter 1 You Ma.docx
Sheet1Rate your skills using the following scaleChapter 1 You Ma.docx
bjohn46
 
Sheet1Quarter Sales PersonRegionQuarterly Sales31-MarSmithEast$750.docx
Sheet1Quarter Sales PersonRegionQuarterly Sales31-MarSmithEast$750.docxSheet1Quarter Sales PersonRegionQuarterly Sales31-MarSmithEast$750.docx
Sheet1Quarter Sales PersonRegionQuarterly Sales31-MarSmithEast$750.docx
bjohn46
 
Sheet1project codeproject nameEmployeesQB280001Account Management .docx
Sheet1project codeproject nameEmployeesQB280001Account Management .docxSheet1project codeproject nameEmployeesQB280001Account Management .docx
Sheet1project codeproject nameEmployeesQB280001Account Management .docx
bjohn46
 
Sheet1Quantity (miles of pipeline)Total CostTotal Fixed CostTotal .docx
Sheet1Quantity (miles of pipeline)Total CostTotal Fixed CostTotal .docxSheet1Quantity (miles of pipeline)Total CostTotal Fixed CostTotal .docx
Sheet1Quantity (miles of pipeline)Total CostTotal Fixed CostTotal .docx
bjohn46
 
Sheet1Pro Forma Income StatementYear 1Year 2Year 3Year 4Year 5Visi.docx
Sheet1Pro Forma Income StatementYear 1Year 2Year 3Year 4Year 5Visi.docxSheet1Pro Forma Income StatementYear 1Year 2Year 3Year 4Year 5Visi.docx
Sheet1Pro Forma Income StatementYear 1Year 2Year 3Year 4Year 5Visi.docx
bjohn46
 
Sheet1PMGT 576 Assignment Rubric – Unit 8 Assignment20Is the Lean .docx
Sheet1PMGT 576 Assignment Rubric – Unit 8 Assignment20Is the Lean .docxSheet1PMGT 576 Assignment Rubric – Unit 8 Assignment20Is the Lean .docx
Sheet1PMGT 576 Assignment Rubric – Unit 8 Assignment20Is the Lean .docx
bjohn46
 
Sheet1Presentation by Tony StudentSlide NumberSlide TitleSlide Tex.docx
Sheet1Presentation by Tony StudentSlide NumberSlide TitleSlide Tex.docxSheet1Presentation by Tony StudentSlide NumberSlide TitleSlide Tex.docx
Sheet1Presentation by Tony StudentSlide NumberSlide TitleSlide Tex.docx
bjohn46
 
Sheet1Pretax IncomeYang, Ziyun make sure to add back income t.docx
Sheet1Pretax IncomeYang, Ziyun make sure to add back income t.docxSheet1Pretax IncomeYang, Ziyun make sure to add back income t.docx
Sheet1Pretax IncomeYang, Ziyun make sure to add back income t.docx
bjohn46
 
Sheet1PMGT 576 Assignment Rubric – Unit 7 Assignment20Are all of t.docx
Sheet1PMGT 576 Assignment Rubric – Unit 7 Assignment20Are all of t.docxSheet1PMGT 576 Assignment Rubric – Unit 7 Assignment20Are all of t.docx
Sheet1PMGT 576 Assignment Rubric – Unit 7 Assignment20Are all of t.docx
bjohn46
 
Sheet1Phase of Business Financal Management needsDebt FinancingEq.docx
Sheet1Phase of Business Financal Management needsDebt FinancingEq.docxSheet1Phase of Business Financal Management needsDebt FinancingEq.docx
Sheet1Phase of Business Financal Management needsDebt FinancingEq.docx
bjohn46
 
Sheet1PeriodEngine Failures(a) 4-period moving average(b) weighted.docx
Sheet1PeriodEngine Failures(a) 4-period moving average(b) weighted.docxSheet1PeriodEngine Failures(a) 4-period moving average(b) weighted.docx
Sheet1PeriodEngine Failures(a) 4-period moving average(b) weighted.docx
bjohn46
 
Sheet1Participant#Verbal Label Condition (Smashed or Hit)Age Condi.docx
Sheet1Participant#Verbal Label Condition (Smashed or Hit)Age Condi.docxSheet1Participant#Verbal Label Condition (Smashed or Hit)Age Condi.docx
Sheet1Participant#Verbal Label Condition (Smashed or Hit)Age Condi.docx
bjohn46
 
Sheet1No.Strengths (3)Weaknesses (2)Recommendations (2)Evidence (u.docx
Sheet1No.Strengths (3)Weaknesses (2)Recommendations (2)Evidence (u.docxSheet1No.Strengths (3)Weaknesses (2)Recommendations (2)Evidence (u.docx
Sheet1No.Strengths (3)Weaknesses (2)Recommendations (2)Evidence (u.docx
bjohn46
 
Sheet1Moisture content analysis final resultsGroupValue of m3 (g)A.docx
Sheet1Moisture content analysis final resultsGroupValue of m3 (g)A.docxSheet1Moisture content analysis final resultsGroupValue of m3 (g)A.docx
Sheet1Moisture content analysis final resultsGroupValue of m3 (g)A.docx
bjohn46
 
Sheet1ManhattanBrooklynQueensThe BronxStaten IslandEducationMarita.docx
Sheet1ManhattanBrooklynQueensThe BronxStaten IslandEducationMarita.docxSheet1ManhattanBrooklynQueensThe BronxStaten IslandEducationMarita.docx
Sheet1ManhattanBrooklynQueensThe BronxStaten IslandEducationMarita.docx
bjohn46
 
Sheet1Learning Solultions NameVersion NumberMediumTypeLessonSc.docx
Sheet1Learning Solultions NameVersion NumberMediumTypeLessonSc.docxSheet1Learning Solultions NameVersion NumberMediumTypeLessonSc.docx
Sheet1Learning Solultions NameVersion NumberMediumTypeLessonSc.docx
bjohn46
 
Sheet1LMH10090H80M70L605040302010NumberRisk NameFull Risk CostRisk.docx
Sheet1LMH10090H80M70L605040302010NumberRisk NameFull Risk CostRisk.docxSheet1LMH10090H80M70L605040302010NumberRisk NameFull Risk CostRisk.docx
Sheet1LMH10090H80M70L605040302010NumberRisk NameFull Risk CostRisk.docx
bjohn46
 
Sheet1Item Price# of ItemsTotal PriceCups$1.896$11.34Plates$1.506$.docx
Sheet1Item Price# of ItemsTotal PriceCups$1.896$11.34Plates$1.506$.docxSheet1Item Price# of ItemsTotal PriceCups$1.896$11.34Plates$1.506$.docx
Sheet1Item Price# of ItemsTotal PriceCups$1.896$11.34Plates$1.506$.docx
bjohn46
 
Sheet1In_OutAustralian_CityInternational_CityAirlineRoutePort_Coun.docx
Sheet1In_OutAustralian_CityInternational_CityAirlineRoutePort_Coun.docxSheet1In_OutAustralian_CityInternational_CityAirlineRoutePort_Coun.docx
Sheet1In_OutAustralian_CityInternational_CityAirlineRoutePort_Coun.docx
bjohn46
 

More from bjohn46 (20)

Sheet1Rate your skills using the following scaleChapter 1 You Ma.docx
Sheet1Rate your skills using the following scaleChapter 1 You Ma.docxSheet1Rate your skills using the following scaleChapter 1 You Ma.docx
Sheet1Rate your skills using the following scaleChapter 1 You Ma.docx
 
Sheet1Quarter Sales PersonRegionQuarterly Sales31-MarSmithEast$750.docx
Sheet1Quarter Sales PersonRegionQuarterly Sales31-MarSmithEast$750.docxSheet1Quarter Sales PersonRegionQuarterly Sales31-MarSmithEast$750.docx
Sheet1Quarter Sales PersonRegionQuarterly Sales31-MarSmithEast$750.docx
 
Sheet1project codeproject nameEmployeesQB280001Account Management .docx
Sheet1project codeproject nameEmployeesQB280001Account Management .docxSheet1project codeproject nameEmployeesQB280001Account Management .docx
Sheet1project codeproject nameEmployeesQB280001Account Management .docx
 
Sheet1Quantity (miles of pipeline)Total CostTotal Fixed CostTotal .docx
Sheet1Quantity (miles of pipeline)Total CostTotal Fixed CostTotal .docxSheet1Quantity (miles of pipeline)Total CostTotal Fixed CostTotal .docx
Sheet1Quantity (miles of pipeline)Total CostTotal Fixed CostTotal .docx
 
Sheet1Pro Forma Income StatementYear 1Year 2Year 3Year 4Year 5Visi.docx
Sheet1Pro Forma Income StatementYear 1Year 2Year 3Year 4Year 5Visi.docxSheet1Pro Forma Income StatementYear 1Year 2Year 3Year 4Year 5Visi.docx
Sheet1Pro Forma Income StatementYear 1Year 2Year 3Year 4Year 5Visi.docx
 
Sheet1PMGT 576 Assignment Rubric – Unit 8 Assignment20Is the Lean .docx
Sheet1PMGT 576 Assignment Rubric – Unit 8 Assignment20Is the Lean .docxSheet1PMGT 576 Assignment Rubric – Unit 8 Assignment20Is the Lean .docx
Sheet1PMGT 576 Assignment Rubric – Unit 8 Assignment20Is the Lean .docx
 
Sheet1Presentation by Tony StudentSlide NumberSlide TitleSlide Tex.docx
Sheet1Presentation by Tony StudentSlide NumberSlide TitleSlide Tex.docxSheet1Presentation by Tony StudentSlide NumberSlide TitleSlide Tex.docx
Sheet1Presentation by Tony StudentSlide NumberSlide TitleSlide Tex.docx
 
Sheet1Pretax IncomeYang, Ziyun make sure to add back income t.docx
Sheet1Pretax IncomeYang, Ziyun make sure to add back income t.docxSheet1Pretax IncomeYang, Ziyun make sure to add back income t.docx
Sheet1Pretax IncomeYang, Ziyun make sure to add back income t.docx
 
Sheet1PMGT 576 Assignment Rubric – Unit 7 Assignment20Are all of t.docx
Sheet1PMGT 576 Assignment Rubric – Unit 7 Assignment20Are all of t.docxSheet1PMGT 576 Assignment Rubric – Unit 7 Assignment20Are all of t.docx
Sheet1PMGT 576 Assignment Rubric – Unit 7 Assignment20Are all of t.docx
 
Sheet1Plan APlan BPro Forma Income Statement AccountsEBIT700100013.docx
Sheet1Plan APlan BPro Forma Income Statement AccountsEBIT700100013.docxSheet1Plan APlan BPro Forma Income Statement AccountsEBIT700100013.docx
Sheet1Plan APlan BPro Forma Income Statement AccountsEBIT700100013.docx
 
Sheet1Phase of Business Financal Management needsDebt FinancingEq.docx
Sheet1Phase of Business Financal Management needsDebt FinancingEq.docxSheet1Phase of Business Financal Management needsDebt FinancingEq.docx
Sheet1Phase of Business Financal Management needsDebt FinancingEq.docx
 
Sheet1PeriodEngine Failures(a) 4-period moving average(b) weighted.docx
Sheet1PeriodEngine Failures(a) 4-period moving average(b) weighted.docxSheet1PeriodEngine Failures(a) 4-period moving average(b) weighted.docx
Sheet1PeriodEngine Failures(a) 4-period moving average(b) weighted.docx
 
Sheet1Participant#Verbal Label Condition (Smashed or Hit)Age Condi.docx
Sheet1Participant#Verbal Label Condition (Smashed or Hit)Age Condi.docxSheet1Participant#Verbal Label Condition (Smashed or Hit)Age Condi.docx
Sheet1Participant#Verbal Label Condition (Smashed or Hit)Age Condi.docx
 
Sheet1No.Strengths (3)Weaknesses (2)Recommendations (2)Evidence (u.docx
Sheet1No.Strengths (3)Weaknesses (2)Recommendations (2)Evidence (u.docxSheet1No.Strengths (3)Weaknesses (2)Recommendations (2)Evidence (u.docx
Sheet1No.Strengths (3)Weaknesses (2)Recommendations (2)Evidence (u.docx
 
Sheet1Moisture content analysis final resultsGroupValue of m3 (g)A.docx
Sheet1Moisture content analysis final resultsGroupValue of m3 (g)A.docxSheet1Moisture content analysis final resultsGroupValue of m3 (g)A.docx
Sheet1Moisture content analysis final resultsGroupValue of m3 (g)A.docx
 
Sheet1ManhattanBrooklynQueensThe BronxStaten IslandEducationMarita.docx
Sheet1ManhattanBrooklynQueensThe BronxStaten IslandEducationMarita.docxSheet1ManhattanBrooklynQueensThe BronxStaten IslandEducationMarita.docx
Sheet1ManhattanBrooklynQueensThe BronxStaten IslandEducationMarita.docx
 
Sheet1Learning Solultions NameVersion NumberMediumTypeLessonSc.docx
Sheet1Learning Solultions NameVersion NumberMediumTypeLessonSc.docxSheet1Learning Solultions NameVersion NumberMediumTypeLessonSc.docx
Sheet1Learning Solultions NameVersion NumberMediumTypeLessonSc.docx
 
Sheet1LMH10090H80M70L605040302010NumberRisk NameFull Risk CostRisk.docx
Sheet1LMH10090H80M70L605040302010NumberRisk NameFull Risk CostRisk.docxSheet1LMH10090H80M70L605040302010NumberRisk NameFull Risk CostRisk.docx
Sheet1LMH10090H80M70L605040302010NumberRisk NameFull Risk CostRisk.docx
 
Sheet1Item Price# of ItemsTotal PriceCups$1.896$11.34Plates$1.506$.docx
Sheet1Item Price# of ItemsTotal PriceCups$1.896$11.34Plates$1.506$.docxSheet1Item Price# of ItemsTotal PriceCups$1.896$11.34Plates$1.506$.docx
Sheet1Item Price# of ItemsTotal PriceCups$1.896$11.34Plates$1.506$.docx
 
Sheet1In_OutAustralian_CityInternational_CityAirlineRoutePort_Coun.docx
Sheet1In_OutAustralian_CityInternational_CityAirlineRoutePort_Coun.docxSheet1In_OutAustralian_CityInternational_CityAirlineRoutePort_Coun.docx
Sheet1In_OutAustralian_CityInternational_CityAirlineRoutePort_Coun.docx
 

Recently uploaded

Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
EADTU
 
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lessonQUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
httgc7rh9c
 

Recently uploaded (20)

HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17
 
Introduction to TechSoup’s Digital Marketing Services and Use Cases
Introduction to TechSoup’s Digital Marketing  Services and Use CasesIntroduction to TechSoup’s Digital Marketing  Services and Use Cases
Introduction to TechSoup’s Digital Marketing Services and Use Cases
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
 
dusjagr & nano talk on open tools for agriculture research and learning
dusjagr & nano talk on open tools for agriculture research and learningdusjagr & nano talk on open tools for agriculture research and learning
dusjagr & nano talk on open tools for agriculture research and learning
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
AIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.pptAIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.ppt
 
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lessonQUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
 
VAMOS CUIDAR DO NOSSO PLANETA! .
VAMOS CUIDAR DO NOSSO PLANETA!                    .VAMOS CUIDAR DO NOSSO PLANETA!                    .
VAMOS CUIDAR DO NOSSO PLANETA! .
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
Play hard learn harder: The Serious Business of Play
Play hard learn harder:  The Serious Business of PlayPlay hard learn harder:  The Serious Business of Play
Play hard learn harder: The Serious Business of Play
 
Tatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsTatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf arts
 
How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17
 
Our Environment Class 10 Science Notes pdf
Our Environment Class 10 Science Notes pdfOur Environment Class 10 Science Notes pdf
Our Environment Class 10 Science Notes pdf
 
Details on CBSE Compartment Exam.pptx1111
Details on CBSE Compartment Exam.pptx1111Details on CBSE Compartment Exam.pptx1111
Details on CBSE Compartment Exam.pptx1111
 
OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...
 
Model Attribute _rec_name in the Odoo 17
Model Attribute _rec_name in the Odoo 17Model Attribute _rec_name in the Odoo 17
Model Attribute _rec_name in the Odoo 17
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 

Sheet1-242.7062237.1326187.084-242.7012236.922174.4266-244.3963224.docx

  • 1. Sheet1-242.7062237.1326187.084-242.7012236.922174.4266- 244.3963224.3101174.6633-247.5536102.916363.6256- 255.3303113.032663.268-254.6957112.727550.2972- 207.6609225.4316188.7366-195.8907223.50710.5973- 202.3447175.467210.5355-250.3654152.0972177.2751- 216.5208147.7045177.3388-233.484149.8988158.7562- 233.5899149.7872196.0947-218.6217259.4074159.1457- 218.7635259.3398196.4452-253.6784127.6148153.4519- 220.1565123.5134153.5878-234.3918143.8452152.9598- 239.238106.8705154.0054-247.5275137.269337.3959- 226.6169107.951137.8928 Sheet1-242.3321237.3833187.0943-242.3044237.2058174.4581- 244.0351224.5884174.62-271.492621.8564163.5829- 271.151124.5395151.0998-272.783812.1067148.4386- 207.2222226.0512188.7679-196.0819224.043210.9913- 202.7517175.151910.9042-250.1148152.3626177.2894- 216.2643148.1046177.3285-233.2696150.1622158.7993- 233.2476150.0874196.0894-218.2906259.6591159.1623- 218.3575259.5781196.4318-256.5068105.7784172.6254- 222.7194101.3124172.3541-239.1924107.4801154.4075- 240.142299.5682190.7925-253.62510.2745130.6542-254.6599- 7.6124166.6589 Sheet1angle5Position 11 7/8fdm - tpmrot0Femur1 3/8dp - da1 1/4dl - dm1 3/8pp - pa4 3/8pa -daTibia1 3/8dp - da1 1/4pl - pm1 3/8pp - pa4 3/8pa - daPosition 230angle 1 3/4fdm - tpm4 7/16t pa - da 16rotPosition 390angle35rot1 5/16fdm - tpm4 5/8t pa - da Sheet1-242.2926237.4313187.1407-242.2976237.2074174.4825- 244.002224.6153174.7045-266.839932.2177122.6565- 269.096439.8643112.768-269.969429.6746105.0252- 207.4538225.8426188.7677-196.2852225.162410.823-
  • 2. 202.7278175.197510.8998-250.2641152.2005177.2745- 216.418147.9588177.3826-233.3907150.0296158.7925- 233.5039149.8913196.094-218.4862259.5074159.1496- 218.6155259.4293196.4586-256.0887109.6023163.2458- 222.3509105.4242163.1927-237.7895118.4377148.3668- 240.681996.2338178.1541-253.514830.151681.5529- 247.32377.4322110.0211 Sheet1-167.9179295.7402188.0109-167.9939295.5717175.3864- 173.1716283.9703175.5642-250.0041102.9112129.0516- 250.4145110.4241118.7922-254.356100.4836111.7631- 136.6091273.7142189.8318-135.4872276.195312.7429- 157.4144226.63711.4406-199.237216.3148178.1369- 167.8298202.3066177.7836-183.8834209.3892159.4639- 183.7567209.3405196.8438-138.7504310.4663160.0457- 138.6953310.3311197.396-216.9796176.5136164.6995- 185.8254162.4202164.0809-197.5133179.0429149.0241- 205.5218160.2233180.3141-239.50295.231187.8262- 238.269973.0878117.6185 Sheet1-167.9774295.7589188.0053Position 1- 168.0357295.5876175.3503-173.216283.9518175.5363- 256.622296.2987172.644-256.202599.1124160.5818- 261.07686.3888157.9777-136.8318273.6341189.8612- 135.6721276.299811.5317-157.9099226.68710.7442- 199.2181216.3236178.1191-167.8099202.4637177.3138- 183.9762209.5402159.1095-183.4766209.2223196.6541- 138.7993310.4902160.0052-138.7065310.3168197.4955- 218.556173.1049174.8681-187.3842159.052174.1021- 202.417168.3658156.1101-204.0305163.8155193.3008- 246.974968.263140.7777-248.281263.4577177.4971 Sheet1-163.9332296.2739188.0595-164.0094296.0685175.3927- 169.2738284.5349175.6338-206.4065173.133663.5365- 210.9568185.008663.7246-210.9498185.223551.0138- 131.6876276.556712.3231-153.9925227.303511.4564-
  • 3. 153.933227.268111.2682-196.0795217.1702178.0817- 164.4559203.0117177.8772-180.5457210.3035159.5472- 180.4487210.0662196.9154-134.6028310.7287160.0411- 134.5312310.562197.4167-205.8811195.7459153.821- 175.285181.6375153.8098-182.6505205.6981153.9805- 198.2314171.6307153.7163-196.7753207.379338.6552- 184.4057172.63937.5567 BIOEN 4250: BIOMECHANICS I Laboratory 2 – Rigid Body Kinematics September 11 – 14, 2018 TAs: Allen Lin ([email protected]), Kelly Smith ([email protected]) Lab Quiz: A 10-point lab quiz, which will count towards your lab grade, will be given at the beginning of class. Be familiar with the entire protocol. Objective: The objective of this laboratory is to use a 3D electromagnetic digitizer to measure the kinematics of a simplified mechanical surrogate of a knee joint (Figure 1) under passive flexion. The student will learn how this measurement technique works and how it can be combined with the equations of 3D rigid body kinematics to track the relative motion between two rigid bodies. The student will also learn how to decode a Matlab script for analysis of the data acquired during the lab.
  • 4. Background: Kinematics is the branch of physics which involves the description of motion, without examining the forces which produce the motion (dynamics or kinetics, on the other hand, involves an examination of both a description of motion and the forces which produce it). A subset of kinematics is that of rigid body kinematics, which as the name suggests, concerns the motions of one or more rigid bodies. A rigid body experiences zero deformation. In other words, all points lying on a rigid body experience no motion relative to each other. In bioengineering, body segments are typically considered to be rigid bodies. These body segments are tracked using a number of techniques such as goniometry, accelerometry, magnetic tracking, fluoroscopy, video systems, and stereo photogrammetry. The technique used in this lab utilizes an electromagnetic digitizer (a manually operated, instrumented wand with a probe on the end) to record the coordinates in 3D space of certain landmarks on the rigid bodies involved. The techniques used to analyze these captured 3D coordinates regarding the movement of these landmarks is very similar to the techniques utilized in the analysis of similar data obtained from video based stereo photogrammetry systems, commonly called photogrammetry. However, for the sake of time, we have bypassed the video analysis portion of the process for laboratory 2. In these visually based systems, which will be used in a
  • 5. laboratory 3, a number of markers are tracked using two or more calibrated video cameras. By placing markers on each body segment, the position and relative angles of each joint can be found. In the lab today, this same data will be gathered using the digitizer. As a possible point of interest, these visual tracking techniques are most renowned for their use in computer animation, where markers are placed on actors who are then videotaped by multiple cameras during a scene (see VICON Motion Capture Systems). The video data is then used to re-create the actor’s motions in computer animated characters. A collaborator of Dr. Jeffrey Weiss (faculty in BIOEN) actually received an Academy Award for using this technology in the production of The Lord of the Rings Trilogy and I-Robot. Photogrammetry is also used in clinical applications for gait analysis. For example, cerebral palsy patients are often analyzed using motion tracking systems in order to determine the abnormalities in their gait. So called “gait reports” are then given to clinicians who are often able to use this information to perform corrective surgeries. Finally, motion tracking of this Figure 1: Experimental rig setup. The “L” shape pieces attached to the sides of the rig have 3 divots that will serve as kinematic marker clusters. In this image, the horizontal piece will represent the femur and the angled piece the tibia. BIOEN 4250: Laboratory 2 – Rigid Body Kinematics
  • 6. 2 type is used in numerous research applications, such as tracking the motion of cadaver knees or generating data for input into a computational model. Equipment: The following equipment will be required for each group. Note that there are only two digitizers. Thus, each lab section will be divided into multiple time slots (and each time slot to 2 separate groups) in order to allow for smaller working groups. • mechanical knee surrogate with mounting bracket • MicroScribe electromagnetic digitizer • allen (hex head) wrench, 3/16”; required for mounting and adjusting knee surrogate • digital calipers • goniometer or protractor • plastic ruler or tape measurer Experimental Procedure: Please read both handouts on Euler angles (located in the Handouts section on the Canvas page) and this entire document before the lab. This will help you prepare both for the quiz and the actual lab procedure.
  • 7. 1. Check to ensure the surrogate knee and mounting bracket are properly secured to the table (as shown in Figure 1). 2. Set the position of the surrogate knee at ~5° flexion (almost straight leg) with the two halves of the lower (tibial) portion of the fixture aligned. 3. Tighten the wing nut at the “knee” to be sure the fixture does not move. 4. Use the calipers, ruler, protractor, etc. to measure the distances between the indicated points on the fixture, as well as the angle between the upper and lower segment of the surrogate. The list of measurements you need to take with the associated definitions is provided at the end of this document. 5. Using the MicroScribe digitizer, you will digitize the coordinates necessary to establish an embedded coordinate system in the upper segment of the fixture (femur) with respect to a coordinate system defined with the markers on the femoral kinematic marker cluster and repeat this process for the lower segment (tibia). The embedded coordinate systems should be set up to follow the conventions in the Coordinate System Conventions section below. Digitize the points on the fixture following the order listed at the end of this document in the section Order of Digitized Points (note that the points necessary to establish the embedded and marker coordinate systems are included in the list of points
  • 8. you need to digitize). The TAs will demonstrate the digitization process at the beginning of the lab. 6. Save the data file from the digitizer as “groupID_Position1.xlsx”. 7. Loosen the wing nut and rotate the “knee” to a position of approximately 30 ̊ flexion and retighten the wing nut. Rotate the lower half of the lower section to the 2nd position (TA will demonstrate this). 8. Using the MicroScribe digitizer, digitize the points on the fixture in the same manner as Step 6. Please ask the TAs if you need clarification or help with the digitization process and/or order of points. The order of the digitized points should be the same in all three positions. 9. Save the data file from the digitizer as “groupID_Position2.xlsx”. 10. Loosen the wing nut and rotate the “knee” to a position of approximately 90 ̊ flexion and retighten the wing nut (with the “tibial” section pointing to the floor). Rotate the lower half of the lower section to the 3rd position (TA will demonstrate this). BIOEN 4250: Laboratory 2 – Rigid Body Kinematics
  • 9. 3 11. Using the MicroScribe, digitize the specified points on the fixture once more. Please ask the TAs if you need clarification or help with the digitization process and/or order of points. The order of the digitized points should be the same in all three positions. 12. Save the data file from the digitizer as “groupID_Position3.xlsx”. 13. Save all data onto your (or your labmate’s) CADE account and collect any hand-written notes before leaving the laboratory. If the data was not saved under your CADE account, you are responsible for obtaining the data from your labmate. Each student should have: • Three data files from the electromagnetic digitizer (“..._Position1.xlsx”, “..._Position2.xlsx”, and “..._Position3.xlsx”). • Manually recorded measurements taken prior use of the digitizer at each of the three positions. This is particularly important for verifying the digitizer data during analysis. • Your notes pertaining to where the coordinates were taken for the reference system, as well as what order the landmarks and “markers” were recorded with the digitizer.
  • 10. Data Analysis: The objective of the data analysis is to determine the transformation matrix between the femoral- and tibial-embedded coordinate systems, as well as the transformation matrix between the marker clusters. These transformation matrices will aid in determining the associated Euler angles during “knee” flexion/extension. Comparison of the calculated Euler angles from these two different transformation matrices will help to illustrate the benefit of going the extra step to find the embedded transformation matrices. You will be provided with a MATLAB program to perform the majority of the data analysis. Please see the instructions for the lab report for additional details on the expected plots/figures from analyzing the data and regarding the preparation of your report. The overall picture of the analysis is as follows: 1. Determine the 4x4 transformation matrix between a coordinate system embedded in the femur (��) and a coordinate system defined using the femoral (upper segment) marker cluster (��), �%&→%(. Note that this transformation never changes during the test, as both coordinate systems are affixed to the same rigid body. This
  • 11. matrix is calculated from the digitized data from Position #1. 2. Determine the 4x4 transformation matrix between a coordinate system defined using the Figure 2: Definition of coordinate transformation matrices. Schematic shows medial view of right knee. BIOEN 4250: Laboratory 2 – Rigid Body Kinematics 4 tibial (lower segment) marker cluster (��) and a coordinate system embedded in the tibia (��), �*(→*&. Note that this transformation also never changes during the test. This matrix is calculated from the digitized data from Position #1. While the tibia (lower segment) of our surrogate is not exactly a rigid body, due to the rotations between the two parts and such, we are going to pretend it is (assuming the entire segment rotates and translates during motion along with the associated “marker” points). 3. Determine the 4x4 transformation matrix between a coordinate system defined using the femoral (upper) marker cluster (��) and a coordinate system defined using the tibial (lower) marker cluster (��), [�%(→*((�)], for all positions. This matrix is calculated from
  • 12. the digitizer data from all three positions. 4. The overall transformation matrix between the embedded femoral and tibial coordinate systems is then: [�%&→*&(�)] = [�*(→*&][�%(→*((�)][�%&→%(] 5. There are three clinical joint flexion angles (flexion/extension, abduction/adduction, tibial rotation) and three translations (medial/lateral tibial displacement, anterior/posterior tibial displacement, joint distraction) typically seen during movement of an actual knee. We will be calculating the Euler angles associated with the motion based on the embedded transformation matrix[�%&→*&(�)], and the “marker” transformation matrix [�%(→*((�)]. These angles do not always coincide with the clinical angles so pay attention to the Euler angle handouts and the orientation of your various coordinate systems (in the coordinate systems section below). Also, feel free to ask your TA if you have any questions. 6. Based on the transformation matrixes [�%&→*&(�)] determined in the Matlab script, manually calculate the tibial distraction (should be close to the distance measured between the two tibial sections). Refer to the Trigonometry Review section below to get the general idea of how to do this. You may use whatever method you wish to do this
  • 13. calculation (Maple, Matlab, Excel, pencil and paper, etc.); however, be sure to indicate the method used, as well as provide a description of how it was done, in you report. Please note, this is not going to be just the value of the difference between the translation vector magnitudes from one position to the next. If you are unclear of the basic idea of how to calculate this, check with the TA. It will also be briefly touched on in the lab session. 7. Use whatever method you like to confirm angles of rotation you imposed (flexion/extension, and tibial rotation). This is why you took all those extra digitized points at positions 2 and 3. You will use these manual calculations for the discussion of your Euler angles and the translation vector component of the transformation matrices. Figure 3: Representation of the “femur” embedded coordinate system orientation to be used for data analysis. Note that the axes are not unit axes and not to scale. The origin is inside the part. Coordinate System Conventions:
  • 14.
  • 15. Femoral Embedded Coordinate System The embedded coordinate system for the femur should be according to that illustrated in Figure 3. The origin of this coordinate system is located inside the part approximately equidistant from the 4 divots at the end closer to the hinge. In relation to anatomical reference terminology (proximal, medial, etc.) the hinge is considered to be the knee. So the origin is at the distal end of the “femur”, and the z-axis is positive in the proximal direction. This is considered to be a left knee, so the mounting bracket is on the lateral side and thus, the x-axis is positive in the medial direction. Tibial Embedded Coordinate System The embedded coordinate system for the tibia should be according to that illustrated in Figure 4. The origin of this coordinate system is located inside the part approximately equidistant from the 4 divots at the end closer to the hinge. In relation to anatomical reference terminology (proximal, medial, etc.) the hinge is considered to be the knee. So the origin is at the proximal end of the “tibia”, and the z-axis is positive in the proximal direction. This is considered to be a left knee, so, again, the mounting bracket is on the lateral side and thus, the x-axis is positive in the medial direction. “Marker” Coordinate Systems The “marker” coordinate systems are referred to in this way
  • 16. because they are filling the same roll that fiduciary markers would fill in a visually based kinematic tracking system. The data analysis for these markers will be very similar to that which would be done for visually tracked fiduciary markers, but will be much simplified by tracking manually digitized points on our fixture rather than incorporating vision tracking software. The coordinate systems for both sets of markers will be set up exactly the same and should be according to that illustrated in Figure 5. The origin of these coordinate systems is located at the “bottom” markers. In relation to anatomical reference terminology (proximal, medial, etc.), the x-axes will be positive in the distal direction, the y-axes will be positive in the anterior direction, and the z-axes will be positive in the medial direction. Trigonometry Review: This section should help give you a better idea of how to calculate the “tibial” distraction (translation along the axis of the lower segment of the fixture) for your lab report. Basically, all you need to do is make a triangle, and solve for the angles and the length of the sides. The triangle you are going to create is shown in Figure 6. Figure 4: Representation of the “tibial” embedded coordinate system orientation to be used for data analysis. Note that the axes are not unit axes and not to scale. The origin is inside the part.
  • 17. Figure 5: Representation of the “marker” embedded coordinate system orientation to be used for data analysis. Note that the axes are not unit axes and not to scale. The origin is located at the “bottom” marker location. BIOEN 4250: Laboratory 2 – Rigid Body Kinematics 6 For the sake of the data analysis, let’s look at this same triangle closer up (Fig. 6). Solving of this triangle can be accomplished by the use of the sine rule: � sin (�) = � sin(�) = � sin (�) To construct this triangle a few pieces of information should be
  • 18. recognized: - Side “�” will be equivalent to the length of the y-z plane portion of the translation vector in [�%&→*&(�)] after that vector is rotated back to the femur embedded coordinate system. - Side “�” does not change from position to position. - Side “�” is equal to “�” for Position #1, but is not for Position 2 and 3 (the difference between “�” and “�” is the tibial distraction or the translation along the axis of the lower segment). The tibial distraction should be similar to the measured change in length of the lower segment during the test. - Angle “�” is equal to (180° flexion angle; flexion angle should be acquired from the Euler angles calculated in the provided code, not the angles you measured by hand.) Given these assumptions, and observations, you should be able to determine the tibial distraction asked for in the report instructions. Please use a reasonable number of significant figures for your calculations. Tips: Use your ruler measurements between the approximate origins of the coordinate systems as a rudimentary way to verify the translations (this is not what is referred to in step 6 or 7). The
  • 19. components of the rotation matrix can be verified by computing the appropriate dot products between the coordinate axes. This yields the cosine of the angle between the axis for a quick check that the angles are approximately right. It will be easiest to verify the transformation matrices if you stick to the conventions described above for orientation of your axes. For instance, the coordinate systems section above always defines the embedded z-axis along the long direction of the bone (shaft), with positive in the proximal direction (toward the body). The embedded x-axis is always oriented medial-lateral, with the medial direction as positive. The embedded y-axis is always oriented anterior-posterior, with the anterior direction as positive. When composing the transformation matrices, remember that you are looking for the transformation that rotates/translates one set of axes into another. Make sure that you define your Figure 6: Left – The triangle you need to make superimposed on an image of the fixture. Remember that the embedded origins are inside the parts under the divots. Right – Generic version of the triangle you need to make with the interior angles labeled with capital letters and lengths of the sides labeled in lowercase letters.
  • 20. BIOEN 4250: Laboratory 2 – Rigid Body Kinematics 7 displacement vectors appropriately (i.e., don’t get them backwards). For the manual calculations in step 6 and 7, try using Matlab to determine the following: - Confirm the flexion/extension angle by finding the change in angle between the vectors formed between the anterior/posterior points on the two main shafts closer to the wingnut (for the “tibia” this would be the anterior/posterior points on the end that is not twisting). Remember Position #1 was not at 0° flexion. - Confirm the tibial rotation angle by finding the change in angle between vectors formed between the anterior/posterior points at either end of the “tibia” segment. - Determine the distraction along the axis of the tibial shaft by using the sine rule on a triangle that has its three vertices at the embedded femoral origin, embedded tibial origin, and the hinge (wing nut screw). With this triangle, you should always be able to determine at least one angle (Euler angle representing flexion angle determined from the transformation matrix by the code) and the length of two sides (1 – the distance from the embedded femur origin and
  • 21. screw does not change, and 2- you have the magnitude of the translation between the two origins from the transformation matrix). Hint: before trying to calculate this, it might be helpful to actually draw a triangle for each of the 3 positions. - Remember that the dot product of two vectors is � ∙ � = |�||�|cos (�), so do not forget to normalize the length of vectors when determining angles between them. BIOEN 4250: Laboratory 2 – Rigid Body Kinematics 8 Measurement Sheet Name: ________________________________ UID: _______________ Group ID: __________________________________________________ Position #1 Flexion angle (measured): _____________________________________________________ _ Femur Distal Medial - Tibia Proximal Medial(in): _____________________________________ Tibial Rotation angle (degrees): __________________________________________________ *Note: Just make an estimate. This is fairly awkward to measure.
  • 22. Femur Distal Posterior – Distal Anterior(in): _______________________________________________ Distal Lateral – Distal Medial (in): _________________________________________________ Proximal Posterior – Proximal Anterior(in): __________________________________________ Proximal Anterior – Distal Anterior (in): _____________________________________________ Tibia Distal Posterior – Distal Anterior(in): _______________________________________________ Proximal Lateral – Proximal Medial (in): ____________________________________________ Proximal Posterior – Proximal Anterior(in): __________________________________________ Proximal Anterior – Distal Anterior (in): _____________________________________________ Position #2 Flexion angle (measured): _____________________________________________________ _ Femur Distal Medial – Tibia Proximal Medial(in): _____________________________________ Tibial Rotation angle (degrees): __________________________________________________ *Note: Just make an estimate. This is fairly awkward to measure. Femur Distal Posterior – Distal Anterior(in): _______________________________________________
  • 23. Distal Lateral – Distal Medial (in): _________________________________________________ Proximal Posterior – Proximal Anterior(in): __________________________________________ Proximal Anterior – Distal Anterior (in): _____________________________________________ Tibia Distal Posterior – Distal Anterior(in): _______________________________________________ Proximal Lateral – Proximal Medial (in): ____________________________________________ Proximal Posterior – Proximal Anterior(in): __________________________________________ Proximal Anterior – Distal Anterior (inches – not including rotation): ______________________ Note: You could also just measure the gap with calipers and combine with your last measurement. same as Position #1 same as Position #1 same as Position #1 same as Position #1 same as Position #1 same as Position #1 same as Position #1
  • 24. BIOEN 4250: Laboratory 2 – Rigid Body Kinematics 9 Position #3 Flexion angle (measured): _____________________________________________________ _ Femur Distal Medial - Tibia Proximal Medial(in): ______________________________________ Tibial Rotation angle (degrees): __________________________________________________ *Note: Just make an estimate. This is fairly awkward to measure. Femur Distal Posterior – Distal Anterior(in): _______________________________________________ Distal Lateral – Distal Medial (in): _________________________________________________ Proximal Posterior – Proximal Anterior(in): __________________________________________ Proximal Anterior – Distal Anterior (in): _____________________________________________ Tibia Distal Posterior – Distal Anterior(in): _______________________________________________ Proximal Lateral – Proximal Medial (in): ____________________________________________ Proximal Posterior – Proximal Anterior(in): __________________________________________ Proximal Anterior – Distal Anterior (inches – not including rotation): ______________________
  • 25. Note: You could also just measure the gap with calipers and combine with your last measurement. Order of Digitized Points 1. Femur Marker Top 2. Femur Marker Bottom 3. Femur Marker Front 4. Tibia Marker Top 5. Tibia Marker Bottom 6. Tibia Marker Front 7. Frame Upper Back Corner 8. Frame Lower Back Corner 9. Frame Lower Front Corner 10. Femur Distal –Medial 11. Femur Distal – Lateral 12. Femur Distal – Posterior 13. Femur Distal – Anterior 14. Femur Proximal – Posterior 15. Femur Proximal – Anterior 16. Tibia Proximal – Medial 17. Tibia Proximal – Lateral 18. Tibia Proximal – Posterior 19. Tibia Proximal – Anterior 20. Tibia Distal – Posterior 21. Tibia Distal – Anterior same as Position #1 same as Position #1 same as Position #1 same as Position #1 same as Position #1
  • 26. same as Position #1 same as Position #1 matlab_files/distraction.m %This code does as the lab states: %it rotates the tibial-femoral translation vector from tibial frame to the %femoral frame. Then it finds the magnitude of just the yz portion of this %vector t1 = T_fe_te1(1:3,1:3)'*T_fe_te1(1:3, 4); t2 = T_fe_te2(1:3,1:3)'*T_fe_te2(1:3, 4); t3 = T_fe_te3(1:3,1:3)'*T_fe_te3(1:3, 4); c = [norm(t1(2:3)) norm(t2(2:3)) norm(t3(2:3))]; matlab_files/Euler_Digitizer.m % BIOEN 4250 FALL 2018 LAB 2 - Rigid Body Kinematics % PROF. Lucas Timmins % TAs: Allen Lin and Kelly Smith % Code Written by E. David Bell, modified from code developed by TREVOR LUJAN
  • 27. % ########### RIGID BODY KINEMATICS ############### % STUDENT NAME : % STUDENT ID : % STUDENT GROUP : % Clear all stored variables and set output format to short, % which is a 5 digit format clear all; format short; % Load the file containing the digitized points for Position 1. This 3 % column matrix will be used to determine the transformations between the % marker clusters and embedded systems, to be inputted in the overall % transformation matrix.
  • 28. D1 = xlsread('Position 1.xlsx'); % Load the file containing the digitized points for Position 2. This 3 % column matrix will be used to determine the transformations between the % marker clusters specific to Position 2. D2 = xlsread('Position 2.xlsx'); % Load the file containing the digitized points for Position 3. This 3 % column matrix will be used to determine the transformations between the % marker clusters specific to Position 3. D3 = xlsread('Position 3.xlsx'); % FORMULATE THE COORDINATE SYSTEM FOR THE KINEMATIC MARKERS % "KINEMATIC MARKERS" ARE THE DIVITS ON THE L SHAPED PLATES THAT ARE TRACKED % AT EACH POSITION - ONE SET FOR FEMUR (upper section)AND ONE SET FOR TIBIA
  • 29. % (lower section). THEY ARE REFFERED TO AS "MARKERS" IN ORDER TO % DISTINGUISH THEM FROM THE POINTS USED TO MAKE THE EMBEDED COORDINATE % SYSTEMS (THOSE DIVITS ON THE MAIN PIECES OF THE FIXTURE)AND BECAUSE THE % SAME ANALYSIS PROCEDURE WOULD BE DONE HAD THIS DATA BEEN AQUIRED FROM % VISUAL TRACKING SOFTWARE. % *********** ESTABLISH ORTHONORMAL COORDINATE SYSTEM ON FEMUR USING KINEMATIC MARKERS **************** %%%%%%%%%%%%%%%%%%%%%%%%%% Naming Conventions %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % dft: digitized femur top : REFERS TO THE DIVIT AT THE TOP OF THE L PIECE INITIALLY % dfb: digitized femur bottom : REFERS TO THE MIDDLE DIVIT ON THE L PIECE % dff: digitized femur front : REFERS TO THE DIVIT ON THE L PIECE CLOSEST TO THE JOINT
  • 30. % e_dfx: base vector along x digitized femur % (2 PTS) C: (What does the following 3 lines of code do?) dft = D1(1,1:3); dfb = D1(2,1:3); dff = D1(3,1:3); % (4 PTS) C: (What does the following do (2 pts) and specifically, why are %the cross products taken? (2 pts)) dfx = dff - dfb; tempdfy = dft - dfb; dfz = cross(dfx,tempdfy); dfy = cross(dfz,dfx);
  • 31. % (2 PTS) C: (What does the following code do?) e_dfx = dfx/mag(dfx); e_dfy = dfy/mag(dfy); e_dfz = dfz/mag(dfz); % *********** ESTABLISH ORTHONORMAL COORDINATE SYSTEM ON TIBIA USING KINEMATIC MARKERS **************** %load tibia kinematic marker coordinates %%%%%%%%%%%%%%%%%%%%%%%%%% Naming Conventions %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % dtt: digitized tibia top : REFERS TO THE DIVIT AT THE TOP OF THE L PIECE INITIALLY % dtb: digitized tibia bottom : REFERS TO THE MIDDLE DIVIT ON THE L PIECE
  • 32. % dtf: digitized tibia front : REFERS TO THE DIVIT ON THE L PIECE CLOSEST TO THE JOINT % e_dtx: base vector along x digitized tibia % (2 PTS) C: (How is this section of the code different from the similar % section above?) dtt = D1(4,1:3); dtb = D1(5,1:3); dtf = D1(6,1:3); dtx = dtf - dtb; tempdty = dtt - dtb; dtz = cross(dtx,tempdty); dty = cross(dtz,dtx); e_dtx = dtx/mag(dtx); e_dty = dty/mag(dty);
  • 33. e_dtz = dtz/mag(dtz); % *********** ESTABLISH ORTHONORMAL REFERENCE COORDINATE SYSTEM FOR TROUBLESHOOTING**************** %This section of the code is commented out because it is not normally %needed, but please still address the one comment requested below. %%%%%%%%%%%%%%%%%%%%%%%%%% Naming Conventions %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % drt - digitized reference top: Top back corner of the mounting frame adjacent to the "femur" % drb - digitized reference bottom: Bottom back corner of the mounting frame % drf - digitized reference front: Bottom front corner of the mounting frame % e_drx: base vector along x digitized reference
  • 34. % C: (6 pts) (Explain where the reference system was taken (2 pts) and how it would % be usefull for trouble shooting (4 pts). ) % drt = D1(7,1:3); % drb = D1(8,1:3); % drf = D1(9,1:3); % % drz = drt - drb; % tempdry = drf - drb; % drx = cross(tempdry,drz); % dry = cross(drz,drx); % % e_drx = drx/mag(drx);
  • 35. % e_dry = dry/mag(dry); % e_drz = drz/mag(drz); % ****** EMBEDDED COORDINATE SYSTEMS IN FEMUR AND TIBIA [DIGITIZED] ******* % NOTE: The mechanical surrogate "knee" is considered to be a left knee in % relation to which side is medial vs lateral. Therefore, the side with the % mounting bracket attached is the lateral side, and the side with the % "markers" attached is the medial side. %%%%%%%%%%%%%%%%%%%%%% Naming Conventions %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %e: embedded, m: medial, l: lateral, o: origin, d: distal %a: anterior, p: posterior f: femur, t: tibia, Prox: proximal %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  • 36. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%% % *********** EMBEDDED FEMUR (femur = upper segment of fixture) *********** % Load embedded femur, lateral coordinates efl = D1(11,1:3); % Load embedded femur, medial efm = D1(10,1:3); % Create a vector in the femoral embedded medial direction following the % coordinate axis conventions in the report instructions efx = efm-efl; % (2 PT) C: (Which points are loaded in the following two lines of code?)
  • 37. efda = D1(13,1:3); efdp = D1(12,1:3); % (4 PTS) C: (Explain why a mean is taken) A = [efdp;efda]; efd = mean(A); % (2 PT) C: (What data points are loaded in the following 2 lines of code?) efaProx = D1(15,1:3); efpProx = D1(14,1:3); % (4 PTS) C:(Explain why a mean is taken)
  • 38. A = [efaProx;efpProx]; efProx = mean(A); % (4 PTS) C: (What does "temp_efz" represent, AND why was it not %calculated directly from digitized points like has been done in other %parts of the code?) temp_efz = efProx-efd; efy = cross(efx, temp_efz); efz = cross(efx,efy); % (2 PTS) C: (What does the following code do?) e_efx = efx/mag(efx);
  • 39. e_efy = efy/mag(efy); e_efz = efz/mag(efz); % *********** EMBEDDED TIBIA (tibia = lower segment of fixture)************ % SAME NAMING CONVENTIONS AS EMBEDDED FEMUR % etl = D1(17,1:3); etm = D1(16,1:3); etx = etm-etl; etaProx = D1(19,1:3); etpProx = D1(18,1:3); A = [etaProx;etpProx]; etProx = mean(A);
  • 40. etda = D1(21,1:3); etdp = D1(20,1:3); A = [etda;etdp]; etd = mean(A); temp_etz = etProx-etd; ety = cross(etx, temp_etz); etz = cross(etx,ety); e_etx = etx/mag(etx); e_ety = ety/mag(ety); e_etz = etz/mag(etz); % *********** MARKER TO EMBEDDED
  • 41. TRANSFORMATION MATRICES **************** % (4 PTS) C:(What does the following function produce, {i.e. what is %"T_fe_fm")(2 pts), and what it will be used for? (2 pts)) T_fe_fm = transform(e_efx, e_efy, e_efz,e_dfx, e_dfy, e_dfz,efd,dfb); % (4 PTS) C: (What does the following function produce, {i.e. what is %"T_tm_te")(2 pts), and what it will be used for? (2 pts)) T_tm_te = transform(e_dtx, e_dty, e_dtz, e_etx, e_ety, e_etz, dtb, etProx); %%% PROCESS "MARKER" MOTION TRACKING DATA AND CALCULATE THE EULER ANGLES%%%
  • 42. %%%%%%%%%%%%%%%%%%%%%%%%% Naming Conventions %%%%%%%%%%%%%%%%%%%%%%%%%%%% %mff: marker femur front mtf: marker tibia front %mft: marker femur top mtt: marker tibia top %mfb: marker femur bottom mtb: marker tibia bottom %e_mfx: base vector along x marker femur %e_mtz: base vector along z marker tibia %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%% % (4 PTS) C: (In general, what does each cycle of the following loop do?) i=1; for i=1:1:3 if i==1 M = D1; end
  • 43. if i==2 M = D2; end if i==3 M = D3; end % (2 PTS) C: (What is being loaded in the following 3 lines of code?) mft = M(1,:); mfb = M(2,:); mff = M(3,:); % (2 PTS) C: (What do the following lines of code do, and why is the %cross product taken?)
  • 44. mfx = mff - mfb; temp_mfy = mft - mfb; mfz = cross(mfx,temp_mfy); mfy = cross(mfz,mfx); % (2 PTS) C: (What does the following code do?) e_mfx = mfx/mag(mfx); e_mfy = mfy/mag(mfy); e_mfz = mfz/mag(mfz); % (4 PTS) C:(In general, what does the following block of code do? {up %the next comment} mtt = M(4,:); mtb = M(5,:);
  • 45. mtf = M(6,:); mtx = mtf - mtb; temp_mty = mtt - mtb; mtz = cross(mtx,temp_mty); mty = cross(mtz,mtx); e_mtx = mtx/mag(mtx); e_mty = mty/mag(mty); e_mtz = mtz/mag(mtz); % (4 PTS) C: (What does the following function produce, {i.e. what is %"T_fm_tm")(2 pts), and what it will be used for? (2 pts)) T_fm_tm = transform(e_mfx, e_mfy, e_mfz, e_mtx, e_mty, e_mtz, mfb, mtb); % (4 PTS) C: (What does the following function produce,
  • 46. {i.e. what is %"T_fe_te")(2 pts), and what it will be used for? (2 pts)) T_fe_te = [T_tm_te]*[T_fm_tm]*[T_fe_fm]; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%% % The following set of "if" statements simply saves the values of % T_fm_tm and T_fe_te as seperate variables so their values from each % loop iteration will be available to the user via the command window % after the program finishes. This variables should be useful for the % manual calculation of the contents of Table 1 in the lab report. if i==1 T_fm_tm1 = T_fm_tm; T_fe_te1 = T_fe_te;
  • 47. end if i==2 T_fm_tm2 = T_fm_tm; T_fe_te2 = T_fe_te; end if i==3 T_fm_tm3 = T_fm_tm; T_fe_te3 = T_fe_te; end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%% %%%%%%%%% CALCULATE EULER ANGLES FROM EMBEDED TRANSFORMATIONS %%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%% Naming Conventions %%%%%%%%%%%%%%%%%%%%%%%%%% %gamma#= rotation about x-axis(rad) gamma#Deg= rotation
  • 48. about x-axis(deg) %theta#= rotation about y-axis(rad) theta#Deg= rotation about y-axis(deg) %phi# = rotation about z-axis(rad) phi#Deg= rotation about z-axis(deg) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%% % NOTE: Remember, each transformation has 2 complete sets of Euler % angles (thus gamma1 is from the first set, and gamma2 is from the % second set). % (4 PTS) C: (In general, what does the code from here to the end of % the loop do?) T=T_fe_te;
  • 49. %(2 PTS) C: (What does this following 3 lines calculate?) theta1=-asin(T(3,1)); gamma1=atan2((T(3,2)/cos(theta1)),(T(3,3)/cos(theta1))); phi1=atan2((T(2,1)/cos(theta1)),(T(1,1)/cos(theta1))); %(2 PTS) C: (Why are a second set of calculations performed in the %following 3 lines that is so similar to that in the 3 lines above?) theta2=pi-theta1; gamma2=atan2((T(3,2)/cos(theta2)),(T(3,3)/cos(theta2))); phi2=atan2((T(2,1)/cos(theta2)),(T(1,1)/cos(theta2))); %(2 PTS) C: (What are the two things accomplished by the following %6 lines of code?) theta1Deg(i) = theta1*(180/pi);
  • 50. gamma1Deg(i) = gamma1*(180/pi)'; phi1Deg(i) = phi1*(180/pi); theta2Deg(i) = theta2*(180/pi); gamma2Deg(i) = gamma2*(180/pi); phi2Deg(i) = phi2*(180/pi); end % (1 pt) C: (What is the following variable use for?) Position = [1, 2, 3]; % (5 PTS) C: (Provide an explanation of the subplots) figure(1); title('Embedded Euler Angle Plots'); orient landscape;
  • 51. subplot(2,3,1) plot(Position,gamma1Deg) title ('Gamma-1 (rotation about x- axis)'),ylabel('Angle(Deg)'),xlabel('Position Number'); subplot(2,3,2) plot(Position,theta1Deg) title ('Theta-1 (rotation about y- axis)'),ylabel('Angle(Deg)'),xlabel('Position Number'); subplot(2,3,3) plot(Position,phi1Deg) title ('Phi-1 (rotation about z- axis)'),ylabel('Angle(Deg)'),xlabel('Position Number'); subplot(2,3,4) plot(Position,gamma2Deg) title ('Gamma-2 (rotation about x- axis)'),ylabel('Angle(Deg)'),xlabel('Position Number'); subplot(2,3,5) plot(Position,theta2Deg) title ('Theta-2 (rotation about y- axis)'),ylabel('Angle(Deg)'),xlabel('Position Number');
  • 52. subplot(2,3,6) plot(Position,phi2Deg) title ('Phi-2 (rotation about z- axis)'),ylabel('Angle(Deg)'),xlabel('Position Number'); %For clarification, in the following 2 lines, "F1" is the handle the %program uses to refer to figure(1), and the set function, is defining %the property "Position"(which is how the program defines where, and how %large the figure will be on the screen). Feel free to adjust this if you %wish to get the figure to be the size you want. Dave (your TA) will be %happy to explain how to do this, during office hours, if you want %(along with any other coding questions you may have for this lab). F1 = gcf; set(F1,'Position', [19 187 1284 477]) %"SUPTITLE" Adds a master title to the entire figure above all the other
  • 53. %subplots. Dave got this subfunction on a webpage where people can submit %specialized Matlab codes they wrote themselves. %YOU NEED TO USE THIS SUBFUNCTION TO GET THIS CODE TO WORK, BUT YOU DO NOT %NEED TO INCLUDE IT IN YOUR APPENDIX %Please remember to update this title to designate the figure as being from %your specific group data, or the TA provided data. suptitle('Embedded Euler Angle Plots') message='NORMAL TERMINATION!' matlab_files/mag.m function length = mag(x) % (5 PTS) C: (What is the output of this function?)
  • 54. length = sqrt((x(1,1))*(x(1,1))+(x(1,2))*(x(1,2))+(x(1,3))*(x(1,3))); matlab_files/rot.m function matrix = rot(x1,y1,z1,x2,y2,z2) % (5 PTS) C: (What does this subfunction do (3 pts), and what is the origin %of this equation? (2 pts) ) matrix = [sum(x2.*x1), sum(x2.*y1), sum(x2.*z1); sum(y2.*x1), sum(y2.*y1), sum(y2.*z1); sum(z2.*x1), sum(z2.*y1), sum(z2.*z1)]; matlab_files/suptitle.m function hout=suptitle(str) %SUPTITLE Puts a title above all subplots.
  • 55. % SUPTITLE('text') adds text to the top of the figure % above all subplots (a "super title"). Use this function % after all subplot commands. % Drea Thomas 6/15/95 [email protected] % Warning: If the figure or axis units are non-default, this % will break. % Parameters used to position the supertitle. % Amount of the figure window devoted to subplots plotregion = .92; % Y position of title in normalized coordinates titleypos = .95; % Fontsize for supertitle
  • 56. fs = get(gcf,'defaultaxesfontsize')+4; % Fudge factor to adjust y spacing between subplots fudge=1; haold = gca; figunits = get(gcf,'units'); % Get the (approximate) difference between full height (plot + title % + xlabel) and bounding rectangle. if (~strcmp(figunits,'pixels')), set(gcf,'units','pixels'); pos = get(gcf,'position'); set(gcf,'units',figunits); else, pos = get(gcf,'position');
  • 57. end ff = (fs-4)*1.27*5/pos(4)*fudge; % The 5 here reflects about 3 characters of height below % an axis and 2 above. 1.27 is pixels per point. % Determine the bounding rectange for all the plots % h = findobj('Type','axes'); % findobj is a 4.2 thing.. if you don't have 4.2 comment out % the next line and uncomment the following block. h = findobj(gcf,'Type','axes'); % Change suggested by Stacy J. Hills % If you don't have 4.2, use this code instead %ch = get(gcf,'children'); %h=[];
  • 58. %for i=1:length(ch), % if strcmp(get(ch(i),'type'),'axes'), % h=[h,ch(i)]; % end %end max_y=0; min_y=1; oldtitle =0; for i=1:length(h), if (~strcmp(get(h(i),'Tag'),'suptitle')), pos=get(h(i),'pos'); if (pos(2) < min_y), min_y=pos(2)-ff/5*3;end; if (pos(4)+pos(2) > max_y),
  • 59. max_y=pos(4)+pos(2)+ff/5*2;end; else, oldtitle = h(i); end end if max_y > plotregion, scale = (plotregion-min_y)/(max_y-min_y); for i=1:length(h), pos = get(h(i),'position'); pos(2) = (pos(2)-min_y)*scale+min_y; pos(4) = pos(4)*scale-(1-scale)*ff/5*3; set(h(i),'position',pos); end end np = get(gcf,'nextplot'); set(gcf,'nextplot','add');
  • 60. if (oldtitle), delete(oldtitle); end ha=axes('pos',[0 1 1 1],'visible','off','Tag','suptitle'); ht=text(.5,titleypos- 1,str);set(ht,'horizontalalignment','center','fontsize',fs); set(gcf,'nextplot',np); axes(haold); if nargout, hout=ht; end matlab_files/trans.m function matrix = trans(R,U) % (5 PTS) C: (Please state what this function does (3 pts), and why % functions are valuable in coding in general. (2 pts)) matrix = [R(1,1), R(1,2), R(1,3), U(1,1);
  • 61. R(2,1), R(2,2), R(2,3), U(1,2); R(3,1), R(3,2), R(3,3), U(1,3); 0 , 0 , 0 , 1]; matlab_files/transform.m function T_i1_i2 = transform(i1x,i1y,i1z,i2x,i2y,i2z,o1,o2) %For clarification, a global origin is created here. This is needed to %determine the translation between coordinate system 1 (our starting point) %and coordinate system 2 (the one we're transforming to). origx = [1 0 0]; origy = [0 1 0]; origz = [0 0 1]; orig = [origx;origy;origz]; origc = [0 0 0];
  • 62. %For clarification, when calculating the transformation matrix between two %coordinate systems using an optical technique (which we are attempting to %mimic with our digitized "marker" data) we need to take into consideration %what coordinate system the translation is in. The translation between the %coordinate systems is calculated by subtracting the coordinate system %origins. This gives a translation in the global coord system. The %translation in the transformation matrix needs to be in terms of the %current coordinate system (the one we are transforming to). If the %translation between the coordinate system origins was in terms of the %reference coordinate system (the one we started from), we could just %multiply the translation by the rotation between the two systems (t'=Mt). %However, as we stated, the translation is in terms of the global
  • 63. system, %so the translation needs to be multiplied by the rotation of the global %system to the current system. One way of doing this is to transform %through the global origin. % (2 PTS) C: (What does each of the 2 resulting matrixes below represent?) R_i1_orig = rot(i1x,i1y,i1z,origx, origy, origz); R_orig_i2 = rot(origx, origy, origz,i2x,i2y,i2z); % (1 PTS) C: (What is calculated in the 2 lines of code below?) u_i1_orig = o1-origc; u_orig_i2 = origc-o2; % C: (Explain why these are calculated differently from each
  • 64. other) %(1 PT Extra Credit) t_i1_orig = u_i1_orig'; t_orig_i2 = R_orig_i2*u_orig_i2'; % (1 PTS) C: (What is calculated in the 2 lines below?) T_i1_orig = trans(R_i1_orig,t_i1_orig'); T_orig_i2 = trans(R_orig_i2,t_orig_i2'); % (1 PTS) C: What is the result of the following, i.e. what is the output %of this subfunction?) T_i1_i2 = [T_orig_i2]*[T_i1_orig];
  • 65. BIOEN 4250: BIOMECHANICS I Laboratory 2 – Rigid Body Kinematics Report Guide Due Date: Thursday, October 2, 2017 (submit via Canvas) Instructor: Lucas Timmins ([email protected]) TAs: Allen Lin ([email protected]), Kelly Smith ([email protected]) 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 <YOUR NAME HERE> <YOUR GROUP ID> <DATE HERE>
  • 66. 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.
  • 67. 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
  • 68. 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: <group ID> Embedded Euler Angle Plots
  • 69. 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
  • 70. 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).
  • 71. 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.