Technical Articles

Teaching Computational Methods to 140+ Second-Year Engineering Students at Virginia Tech

By Dr. Robert A. Canfield, Virginia Tech

MATLAB® has been the core computational tool in AOE 2074: Computational Methods at Virginia Tech for many years. This second-year course equips engineering students with two skill sets that they will need throughout their academic careers and beyond. The first is the ability to use numerical methods to solve engineering problems that involve root finding, simultaneous linear equations, linear regression, interpolation, and numerical integration and differentiation. The second is the ability to apply MATLAB as a computational tool and as a programming language.

When I began teaching the course, I wanted to give students more hands-on experience with MATLAB and more one-on-one instruction with teaching assistants. These changes required a significant overhaul of the course structure. The revamped course provides the foundation for a department-wide approach designed to integrate MATLAB more deeply throughout the aerospace and ocean engineering curricula (Figure 1).

Figure 1. Virginia Tech's MATLAB integrated curriculum.

A Fundamental Change

To accommodate the more than 140 students who typically attended, Computational Methods used to be a conventional lecture-based course. Two weekly 75-minute lectures were complemented by homework assignments in MATLAB designed to reinforce the material covered in class.

A key weakness of this format was that too much time passed between introducing a concept and letting the students try it themselves. When students are learning to program and solve problems, they need to apply what they learn as they go along. Presenting too many topics in sequence without letting students work on relevant problems makes it difficult for them to assimilate what they have learned.

To address this issue, I converted the second 75-minute lecture into a lab session. Teaching assistants (TAs) lead these sessions, each TA working with about 30 students. The labs not only enable one-on-one interaction between students and their TAs; they also enable students to learn from one another while working through examples together. More importantly, students work hands-on with MATLAB soon after learning a new numerical method, with a TA available for guidance.

Changing the course structure enabled us to teach a class of 140 to 180 students—while providing each student with regular, direct access to an instructor. The change precipitated another adjustment to make the course work efficiently: supplementing lecture materials with the online MATLAB tutorial.

Taking Advantage of the Interactive MATLAB Tutorial

Because I had cut lecture time in half, I wanted to supplement the lectures with learning activities that students could complete on their own. The interactive, online MATLAB tutorial is an excellent fit. In addition to providing a basic introduction to MATLAB, it includes modules for many of the topics covered in the course, including computational data analysis, curve fitting, data visualization, and MATLAB programming basics.

Although engineering students are exposed to MATLAB in their first year, before the first lab session they review the introductory MATLAB tutorial they have already seen to bring them back up to speed. They are then assigned portions of additional modules from both fundamental MATLAB tutorials and the Interactive Computational Mathematics tutorial, which match the syllabus topics as they go along. I’m especially pleased that MathWorks developed the more advanced computational math tutorials that I had suggested once we had seen the benefit of the fundamental tutorials.

The format of the interactive MATLAB tutorials met the needs of the revamped course. After presenting new material, the tutorial poses questions with feedback to student responses. In some cases, students have to respond by typing MATLAB commands. The module then evaluates the correctness of their response before students need to use those concepts and commands to complete homework assignments. This interactivity is particularly helpful in self-directed learning activities, which are assigned in between the lecture and computer lab.

Automating Assignment Grading with MATLAB Cody Coursework

For TAs, the new course structure emphasizes teaching and one-on-one interaction with students. To accommodate this shift, I needed to remove some of the burden that the TAs were carrying. In the past, most of the 25 to 30 hours per week that the five TAs were expected to spend went into grading labs and homework assignments. I wanted the TAs to spend more time working directly with students, without increasing the TA workload.

The solution was to use MATLAB Cody Coursework to automatically grade assignments. TAs now meet for one hour at the beginning of each week with me and my colleague Kevin Wang. They then spend 100% of their remaining time teaching lab sessions and in office hours; they spend no time grading. Students copy the weekly Cody Coursework assignment to their local MATLAB environment and work on the problems at their own pace. The more eager work ahead and begin solving the homework problems due by the next class. Because test suites are employed to grade each assignment as it is submitted, students get instant feedback on their results, with a green check mark indicating a correct solution (Figure 2).  

Figure 2. Sample student homework results in MATLAB Cody Coursework.

Students are encouraged to debug their code locally before submitting their solutions.

At first, because students see the suite of test cases in Cody Coursework that must be passed, we were concerned that the assignments might be too simple, but our concerns turned out to be unfounded—the approach enables students to learn more quickly from their mistakes on their own. The move to Cody Coursework has proven to be beneficial from a teaching perspective, and student feedback has been positive. One student told me, “I live for green check marks!” Overall, Cody Coursework has enhanced student engagement in the course.

Integrating MATLAB into the Curriculum

Computational Methods is a required course for all second-year students in aerospace and ocean engineering. While redesigning the course, I asked colleagues in my department about problems they assign that require the use of numerical methods and MATLAB. Professor Wang and I incorporated their input by using some of their course materials to complement the examples provided in the course textbook, Steven Chapra's Applied Numerical Methods with MATLAB for Engineers and Scientists.

Chapra illustrates several concepts using a bungee jumper example. Our students use MATLAB to model the dynamics of a single bungee jumper and of several jumpers linked together. Other assigned problems include simulating the trajectory of a rocket, calculating aerodynamic forces over an airfoil, and fitting data from wind tunnel experiments. Examples like this engage the students and help them visualize the system behavior. The course content loosely follows the material in the textbook, starting with modeling and programming; proceeding to roots and optimization, linear systems, curve fitting, integration, and differentiation; and ending with simple differential equations.

We have made Computational Methods a prerequisite for our gateway courses in the second sophomore semester. Professors who teach junior- and senior-level courses that require students to find numerical solutions count on the students having experience solving them with MATLAB. Because faculty can now depend on our students having mastered MATLAB fundamentals, they can go more deeply into the course material (see Figure 1). We expect this effect will be amplified as more courses incorporate MATLAB.

Aerospace and ocean engineering students become more proficient every semester, tackling increasingly challenging problems and design projects. Several past students have told me that they've used the numerical methods they learned in my class for their experimental laboratory class and in their senior design course—and in ways they hadn't expected.

The restructured course has already yielded positive results. Our department teaches an astrodynamics course in which students use MATLAB for a number of homework assignments. At the start of the course, the instructor gives an assessment quiz to test the students' knowledge of MATLAB. Once there were students in his class who had attended the revamped Computational Methods, he noted that they scored significantly higher than students in previous years on his MATLAB assessment quiz.

Teaching Analytical Thinking

In his lectures, Professor Wang often uses MATLAB interactively to create plots that illustrate new concepts, or to demonstrate examples from the textbook. Many of the features that make MATLAB an excellent teaching tool—including the ability to execute commands interactively and visualize results—make it an effective learning tool, as well. Students don't have to compile, execute, and debug code in a low-level language. Instead, they can develop an algorithm by interactively entering MATLAB commands. For example, they used the plotting capabilities to verify their simulation of a falling bungee jumper reaching terminal velocity and then assembled all the steps into a script (Figure 3).

  Figure 3. Interactive MATLAB plot and script, used to introduce the students to numerical methods. See animation.

My colleagues and I believe that it's important for students to develop the analytical thinking capability that comes with learning how to program algorithms. Even if the companies they eventually work for use highly specialized applications, modified algorithms and analyses are almost always needed as well. By adopting a hands-on approach with MATLAB in the second year and integrating MATLAB throughout the engineering program, we equip our students with the critical analytical skills that companies require in engineering graduates, including the ability to use numerical methods to solve real-world engineering problems.

Note: Cody Coursework became MATLAB Grader in July 2018.

About the Author

Robert Canfield is Professor and Assistant Head for Academic Affairs of the Department of Aerospace and Ocean Engineering at Virginia Tech. His research interests include multidisciplinary design optimization, high-altitude long endurance sensorcraft, and aeroelastic sensitivity for air vehicle conceptual design. Before joining the Virginia Tech faculty, Dr. Canfield worked for 24 years in the U.S. Air Force. Dr. Canfield holds B.S. in mechanical engineering from Duke University, an M.S. in aeronautics and astronautics from Stanford University, and a Ph.D. in engineering mechanics from Virginia Tech.

Published 2015 - 91984v02