Conceptual Learning of Fluid Mechanics and Image Processing using MATLAB Grader

-Huey Yee Chan, University of Melbourne, Engineering

Author Profile
Initial Publication Date: November 10, 2021

Summary

In a first-year undergraduate engineering subject, MATLAB Grader is applied as an assessment tool to enhance conceptual knowledge and provide an avenue for students to solve engineering design problems via programming in the context of fluid mechanics and image processing to be applied to a large scale engineering design project.

Share your modifications and improvements to this activity through the Community Contribution Tool »

Learning Goals

In various MATLAB Grader homework assessments and practice questions, students write scripts (or functions) to

  • perform basic MATLAB operations (fundamental knowledge in MATLAB), e.g. matrix operations, equation input and plotting
  • perform fluid mechanics calculations on different types of fluid systems e.g. pipe and fitting losses
  • plot data from a fluid system e.g. system curve and pump curve
  • apply basic image processing functions to extract and identify objects in an image, e.g. binary mask and thresholding
  • apply various image analysis concepts e.g. histogram and filtering
  • apply conditional and selection programming statements to solve a problem where necessary e.g. using if/else, for and while loops.

MATLAB Grader has served as a valuable platform in the subject where students are able to practise their programming skills from a large question repository and receive real-time feedback.

Context for Use

MATLAB is the main programming platform used in a first-year undergraduate engineering subject, where a cohort of approximately 400 students work in groups of 4 members on a semester long design project. The project is a real-world engineering design problem involving a water distribution and monitoring system to a remote community of residents. Within the subject, foundation theoretical knowledge required for the design project is delivered during lectures and MATLAB programming/problem solving skills are developed in the workshop classes. As part of an approach to help develop MATLAB proficiency, students complete MATLAB Grader technical problems related to engineering principles such as fluid mechanics and image processing leading up to their design project.

The MATLAB Grader problems are presented in two forms:
Homework assessment - Students complete 4 sets of MATLAB Grader homework assessment questions, which are made available at the end of the week after the particular topic has been taught in lectures or workshop classes. The number of questions in each homework assessment set vary (ranging from 2 to 5) depending on the complexity of questions. Students are given 2 weeks with unlimited attempts to complete a particular set of homework assessment.

Repository of practice questions – a large repository of MATLAB Grader problems (60+ questions) in areas of fundamental MATLAB, fluid mechanics and image processing, are made available to students throughout the semester, not assessed and for practice purposes only.

Since this is a first-year subject and students are unfamiliar with MATLAB, the first set of questions in the first few weeks will introduce MATLAB fundamentals where students are led through the programming steps by the instructor during class.

Description and Teaching Materials

The files attached contains 3 example problems from the subject.
- MATLAB Grader Problem 1 - MATLAB Fundamentals
- MATLAB Grader Problem 2 - Fluid Mechanics
- MATLAB Grader Problem 3 - Image Processing

Within MATLAB Grader, Problems 1, 2 and 3 are set up as different questions in the following manner:

  • The question (problem description) is written under the Problem Description and Instructions section. The interface is versatile and provides useful features that allows the incorporation of images, hyperlinks and equations in the problem statement to enhance readability display.
  • The correct solution to the problem is a script entered under the Reference Solution tab within theCode section.
  • A template is provided for the image processing question (Problem 3) under the Learner's Templatetab, whereby students are supposed to complete. No template was necessary for Problems 1 and 2. 
  • Automated assessment of the question is achieved through a series of Tests written using MATLAB coding under the Assessment section. MATLAB Grader offers different types of testing methods to suit the different nature of tests. The option is available to allocate mark weightage depending on the expectations of each test.


MATLAB Grader Problem 1 – MATLAB Fundamentals (Acrobat (PDF) 447kB Nov9 21) 
MATLAB Grader Problem 2 - Fluid Mechanics (Acrobat (PDF) 1.7MB Nov9 21) 
MATLAB Grader Problem 3 - Image Processing (Acrobat (PDF) 1MB Nov9 21) 

Teaching Notes and Tips

Before students attempt a MATLAB Grader assessment, the instructor should

  • demonstrate an example problem or two in MATLAB Grader
  • work through the completion of a solution for the problem(s) presented
  • demonstrate how the 'run script' and 'submit' buttons work
  • explain the test code used in the MATLAB Grader assessment

It takes a significant amount of time and effort to establish a repository of such MATLAB Grader problems but it is worth it since the problems can be reused every semester and modifications are easily applied.

Due to the large cohort size in the subject, collusion is a potential issue. Measures for minimising collusion could be put in place by randomly allocating students to multiple different versions of each question for the homework assessments.


Assessment

The Tests in the MATLAB Grader problems are specifically designed to test student solutions for completion and correctness, and provide troubleshooting feedback/hints for incorrect solutions.

The use of the assessVariableEqual function in the test code to provide specific hints on where a coding error has occurred has helped students in troubleshooting particularly when there are consequential errors in the long calculations.
e.g. assessVariableEqual('v', referenceVariables.v,'AbsoluteTolerance',0.00001,'Feedback','h_pipe and h_fittings are incorrect because velocity is incorrect');

The Feedback on Incorrect (in addition to default feedback) option within the Assessment section is very useful for providing additional information in helping students with certain concepts, in particular for Fluid Mechanics problems involving multiple formulas and derivation.

The best way to develop proficiency is through practice problems and making mistakes, and since there are unlimited attempts at a submission, we encourage students to use the feedback/hints and keep trying until they reach the correct solution.