Technical Articles and Newsletters

Virtualizing Electrical Engineering Teaching Labs

By Dr. Matthias Henker and Dr. Kristina Kelber, University of Applied Sciences (HTW) Dresden


When the COVID-19 pandemic obliged universities across Germany to shut down, like many of our colleagues around the world we had to rapidly move classes online. Fortunately, a few years earlier we had begun moving from traditional pen-and-paper assignments to a digital approach in which students solve problems using computational software. This shift was prompted by our desire to equip students with the computational thinking skills and programming proficiency that professional engineers need today. 

Following the sudden shutdown, we began offering virtual labs to support both online learning and a hybrid combination of online and in-person learning. The first course that we virtualized was Signals and Systems. In the past, the lab assignment for this course involved working with real hardware: a signal generator, an oscilloscope, and a device under test, usually a filter. When students could no longer come into the lab, we created digital replicas of these hardware devices in MATLAB® so that students could complete lab experiments interactively at home (Figure 1). 

Figure 1. A MATLAB app for conducting virtual lab experiments with signal generation, filtering, and visualization.

Students take two preparatory courses before the Signals and Systems lab: an introduction to MATLAB, taken in the second semester, and a course on measurement in engineering, taken in the third semester.

Introducing MATLAB and Engineering Measurement

In their second semester, HTW Dresden electrical engineering students develop baseline MATLAB skills by completing MATLAB Onramp tutorials. Pre-COVID, we would bring them into the computer lab to work on exercises of gradually increasing difficulty. This early MATLAB experience introduced them to an engineering tool that they will use during their internships and throughout their careers.

In the third-semester course on measurement, students learn to set up, handle, and configure test and measurement hardware, including signal generators, oscilloscopes, and digital multimeters (DMMs) (Figure 2). 

Figure 2. Lab setup with signal generator and oscilloscope.

In addition to teaching the students to take manual measurements, we also teach them how to take the automated measurements required for Industry 4.0 and IoT applications. Students use MATLAB, Instrument Control Toolbox™, and Data Acquisition Toolbox™ to stimulate devices under test, acquire test signals, and then visualize the results. 

In an early assignment, for example, the students use the DMM to measure voltages and currents manually. In later assignments, students use MATLAB to control the equipment directly and write scripts that determine the frequency response of a system or generate Bode plots (Figure 3). They also learn how to use object-oriented programming in MATLAB to configure reusable test routines.

Figure 3. Sample object-oriented programming script for configuring test routines.

Virtualizing Signals and Systems Labs

A course in signals and systems is a core requirement in virtually all electrical engineering programs. HTW Dresden students take the course in their fourth semester. It includes four three-hour lab sessions covering Fourier analysis and synthesis of periodic signals, signal sampling, measuring the impulse and step responses of linear filters, and measuring the frequency responses of linear filters.

Before 2017, students completed the first two labs using MATLAB and the second two with pen and paper. After HTW Dresden acquired a Campus-Wide License for MATLAB, they completed all assignments in MATLAB using live scripts. We now provide formatted live scripts that include instructions and some prepared MATLAB code. The students update the scripts with their own results and add code as needed to complete the assignment (Figure 4). The live scripts enable students to build their programming skills. These scripts are much easier to grade than traditional lab reports because we know exactly where to find the two or three key results that we need to check for each lab.

Figure 4. A MATLAB live script used in the fourth Signals and Systems lab assignment. 

When the university shut down, we virtualized the lab exercises for this course so that students could complete them from home while retaining as much of the in-lab experience as possible. For the third assignment, for example, instead of having students collect data from the oscilloscope and process it in a live script, as they would do in the lab, we provided measured data as a CSV file and had them use this data to produce visualizations in MATLAB (Figure 5).

Figure 5. Impulse responses visualized in MATLAB.

For the final lab assignment, we took the virtualization one step further. As part of his master’s thesis, our colleague Christoph Laabs developed a MATLAB app (shown in Figure 1) that emulated a signal generator, level meter, oscilloscope, and various filters. Created using App Designer, the interface for this app replicates the controls on the lab equipment. This made it easy for students to complete the final assignment at home, using the app to generate frequency response measurements and then plotting and estimating cutoff frequencies in a MATLAB live script, as shown in Figure 4.

Internships and Upper-Level Courses

In their fifth semester, our students complete internships in which they work with practicing engineers on actual projects. The students are well-prepared for their internships because they know how to analyze electronic circuits and systems with analytical and experimental approaches, control measurement devices to stimulate systems under test, and analyze and visualize test results. In fact, our industry partners have told us that, while it takes most internship students three weeks to become productive, our students need just a few days.

The improvements that we made to virtualize coursework during the shutdown are now being used in our correspondence courses, and we continue to use them to conduct lab sessions online as needed. We are currently exploring other potential improvements, including making it possible for students to control lab hardware remotely via MATLAB.

HTW Dresden is among the more than 1500 universities worldwide that provide campus-wide access to MATLAB and Simulink. With a Campus-Wide License, researchers, faculty, and students have access to a common configuration of products, at the latest release level, for use anywhere—in the classroom, at home, in the lab, or in the field.

About the Authors

Dr. Kristina Kelber and Dr. Matthias Henker are professors and members of the faculty of electrical engineering at HTW Dresden.

Published 2021

View Articles for Related Capabilities