**Lab 3 - Biomechanics** **[ENGR 12 Spring 2026](index.html)** (#) Background In this lab, you will model your elbow joint as a second-order system with damping. In lecture, you will learn how to analyze second-order systems analytically. Today, you will use the general step response of a second-order system and fit a curve for each group member in two different conditions: with and without a 3 lb. weight in hand. (##) Objectives * Explain the parameterization of second order systems in terms of natural frequency $\omega_0$ and damping ratio $\zeta$. * Measure physical parameters using experimental data. (##) Before you begin * Find your seat * [Section B](B3.pdf) - 2/25 * [Section C](C3.pdf) - 3/2 * [Section D](D3.pdf) - 3/4 * [Section A](A3.pdf) - 3/16 * Log into the desktop PC * Power up the oscilloscope. (##) Resources * Reference the [pre-lab slides](lab3.pdf) as needed. * Download the [E12 lab report template](E12_Lab_Report_Template.zip) and upload it to Overleaf. Share it with your lab partner. Equipment manuals: * [MDO34 Oscilloscope](MDO34_Oscilloscope.pdf) * [AFG1022 Function Generator](AFG1022.pdf) Starter code: * [`load_tek_csv.m`](load_tek_csv.m) * [`lab3_starter.zip`](lab3_starter.zip) (##) Hypothesis Before beginning the experiment, write down your group's hypothesis from the pre-lab. If you are unsure, write down the hypothesis we voted on as a class. # Experiment ## Setup 1. Plug in the goniometer and set up your oscilloscope with the following settings: * Channel 1 vertical scale: 2.0 V / division * Horizontal scale: 100 ms/division * Trigger mode: *Auto* 2. Strap the goniometer snugly to one group member's arm, taking care to align the hinge with the elbow. !!! Tip I recommend that you strap the side of the goniometer that has the battery pack to your forearm, and the thinner metal-only side to your upper arm. 3. Turn on the goniometer and examine the scope as the group member wearing it flexes their elbow. Write down the voltage readings you observe when the elbow is fully extended (straight) and flexed to about 90°. Call these readings $V_{e}$ and $V_{f}$. 4. Set up the trigger level and slope to capture an elbow flexion. The trigger slope should be the same sign as $V_{f} - V_{e}$, and the trigger level should be about 0.2 V away from $V_{e}$ in the direction of $V_{f}$. !!! Tip ***Example:*** Say that the fully extended voltage is $V_{e} = 8.9$ V and the 90° flexed voltage is $V_{f} = 5.8$ V. Then your trigger slope should be **downwards** since $V_{f} < V_{e}$ and your trigger level should be **a bit below $V_{e}$** at around 8.7 V. 5. Straighten the arm in the goniometer to get back to $V_{e}$. Then set the trigger mode on the oscilloscope to *Norm*. The trace on the screen will stop moving and you should see an *Ready* message towards the bottom right of the screen. Then quickly flex the arm to 90°. Make sure the arm stays still at 90° after the end of the motion. When the arm flexes, you should see a new capture appear on the scope. If not, ensure the level and slope are correct, and call me over to assist with debugging if you get stuck. 6. Adjust the horizontal and vertical positions (and scales if necessary) to get a clean capture with clearly flat voltages both before and after the arm motion. Note you may need to re-capture the data after each scope adjustment to see its effects. !!! Tip You can hit the run/stop button on the scope to pause the screen on currently-captured data. When you hit the run/stop button a second time, you should once again see the *Ready* message. !!! ***Checkpoint:*** Show me your clean data capture on the scope before moving on to record the rest of your data. ## Data capture 1. Save your data recording from the first group member to a file called `student1A.csv`. 2. Now have the same group member hold a 3 lb. weight in their hand while quickly but smoothly flexing from straight to 90°. Go as fast as you can without jerking or straining, and make sure to keep your arm steady at 90°. Save the second data recording to a file called `student1B.csv`. 3. Now repeat the steps above to collect data from the other group member(s). The files should be named `student2A.csv`, `student2B.csv` (etc.). !!! Warning ***When you have finished recording, make sure to turn the switch on the goniometer to the OFF position.*** Verify that Channel 1 on the scope is at 0 V before continuing. # Analysis To complete these tasks, you will need to download and extract [the starter code](lab3_starter.zip). !!! Tip Make sure to save your code, as you will need to submit it with your lab report. ## Implement a second-order step response Modify the `second_order_step.m` file from the starter code to implement the second-order step response from [the pre-lab slides](lab3.pdf). You can verify your implementation is working by running the `check_second_order_step.m` script. !!! ***Checkpoint:*** show me or the wizard your successful output from the `check_second_order_step.m` script before moving on. ## Fit a second-order step response to your biomechanics data Now write a script to fit second order step responses to all of the goniometer data files you recorded. Use the function `e12_curvefit.m` from the starter code for the curve fitting. !!! Warning Read the code in `e12_curvefit.m` or type `help e12_curvefit` in the command line to make sure you know how to use this function. Your script should generate a plot for each recording that clearly shows: * the Channel 1 trace from the oscilloscope * the (hopefully) overlapping best-fit function for the data * labels or titles indicating the individual (1, 2, ...) and condition (no weight/weight) for which the data was gathered. !!! Tip Make sure to record the best-fitting $\omega_0$ and $\zeta$ values for each trial so you can include them in your lab report. !!! ***Checkpoint:*** Show me your plots before moving on to the report. # Writing your lab report Write a lab report using $\LaTeX$ that adheres to the guidelines in the [E12 Lab Report Template](E12_Lab_Report_Template.zip). In addition to the guidelines in the template, below are guidelines specific to some sections of the report for this lab. (##) Introduction * Explain, in your own words, the purpose of today's lab. Why are we interested in modeling human motion as a second-order system? What are physical interpretations of $\omega_0$ and $\zeta$ when applied to the motion of an elbow flexing? How does curve fitting help estimate parameters of this biomechanical system? * State your hypothesis from the pre-lab along with the justification for it. If your group was unsure, state the lab section's consensus hypothesis. How did you predict that the weight would affect $w_0$ and $\zeta$, and why? (##) Theory * Present the unit step response and the general step response of a second-order system. Discuss how this response can be parameterized by $\omega_0$ and $\zeta$. * Show that the values for $A_1$ and $A_2$ on the pre-lab slides can be derived by solving for the initial conditions $x(0) = 0$ and $\dot{x}(0) = 0$, given known values for $s_1$ and $s_2$. (##) Results * Present your graph(s). Do the data match the best-fit curves well? Was there a better or worse fit overall for one person in the group or one condition (e.g. no weight vs. weight)? (##) Discussion * Did the experiment confirm or reject the lab section's hypothesis? How do you know? * To what extent is it reasonable to describe this biomechanical system as a single second order system with two parameters? What are the benefits and drawbacks of considering the system in this manner? (##) Submission Before your next lab meeting, please submit to Moodle: * Your lab report in PDF format. * All .csv data files you recorded from the oscilloscope. * Any code you wrote as .m files. You do not need to include any of my starter code.